Uber Interview Question

some question about array