Uber Interview Question

Asked me to solve a leetcode problem