Uber interview question

the question are mostly from data structure