Citi interview question

given infinite 1 to 9 numbers randomly in an array sort them