Google interview question

The question is a bit tricky, and it's about random array and list.