OpenText Interview Question

Sort an array without extra space