Uber interview question

some question about array