Goldman Sachs interview question

How would you implement sorting algorithm for different cases?