Find earliest time all riders become connected | Uber Coding Question