Uber interview question

Pretty simple stuff if you know data structures well and have done LeetCode (Medium) before.