Modified Bus Routes: each bus runs its route in an infinite loop; find the minimum number of bus changes to reach the destination from the source.
Asked in the Coding stage.
Implement min_bus_changes(routes, source, destination). routes[i] lists the stops served by bus i; return the minimum changes, or -1 if unreachable. Staying at the source requires 0 changes.
Examples:
[[1, 2, 7], [3, 6, 7]], 1, 6 returns 1.[[1, 2], [3, 4]], 1, 4 returns -1.def min_bus_changes(routes, source, destination):