Goldman Sachs Interview Question

Describe an implementation of sort function