Domanda di colloquio di Goldman Sachs

How would you implement sorting algorithm for different cases?