Kumaran Systems interview question

how to convert array into list