Microsoft Interview Question

The question is to sort array