Decide reachability with buses and limited walking | Amazon Interview Question