Microsoft Interview Question

Solve a sorting problem