Find earliest time all riders become connected | Uber Interview Question