Pergunta de entrevista da empresa Ankasoft

Write an algorithm that removes duplicate numbers from an array, keeping only one instance of each number, and then sorts the array.