why?
specifically, why you not should return sorted array from function which is designed to sort the input array?