Uber Interview Question

the question are mostly from data structure