Uber interview question

General algorithm question and system design