Uber interview question

Basic coding questions nothing much difficult