Pergunta de entrevista da empresa Thoughtworks

Array with sort without using an inbuilt function.