Uber interview question

Basic algorithm question (Leetcode medium). One design question and bunch of behavior questions.