Kumaran Systems Interview Question

how to convert array into list