Goldman Sachs interview question

Describe an implementation of sort function