Morgan Stanley Interview Question

Bus stop problem