Microsoft interview question

Write a full code for sorting.