Uber interview question

Background