Uber interview question

Will not disclose, but common leetcode