Pergunta de entrevista da empresa Oracle

Give a algorithm to sort an array efficiently and write a code for the same