Microsoft interview question

A simple sorting problem