OpenText interview question

Sort an array without extra space