Uber interview question

Basic problems that weren't too hard. If you understand basic recursion and data structures you'll do fine.