Given an integer array nums, sort it in non-decreasing order using the Quick Sort algorithm, implemented recursively. Pick a pivot, partition the array into elements less than, equal to, or greater than the pivot, and recursively sort the less-than and greater-than partitions. Return the sorted array.
Input: An integer array nums.
Output: Return the sorted array as [v1,v2,...].
Input: [5,2,3,1,4]
Output: [1,2,3,4,5]
Explanation: Classic quick sort output.Input: [3,3,3]
Output: [3,3,3]
Explanation: All equal; order preserved.Input: [-1,0,1]
Output: [-1,0,1]
Explanation: Already sorted, including negatives.1 <= nums.length <= 100-10^9 <= nums[i] <= 10^9