Uber interview question

the exact problem Leetcode 64