Pregunta de entrevista de Thoughtworks

Array with sort without using an inbuilt function.