TeleDNA interview question

sorting array element without predefined util method