Java. Quick Sort.
\n    public int[] sortArray(int[] nums) {\n    \tQuickSort(nums, 0, nums.length - 1);\n    \tint result[] = new int[nums.length]; \n        for (int i = 0; i <
```\n    public int[] sortArray(int[] nums) {\n    \tQuickSort(nums, 0, nums.length - 1);\n    \tint result[] = new int[nums.length]; \n        for (int i = 0; i < nums.length; i++) {\n        \tresult[i] = nums[i];\n        }\n        return result;\n    }\n    \n    public static void QuickSort(int nums[], int lhs, int rhs) {\n    \tif(lhs >= rhs) return; \n\t\tint mid = Partition(nums, lhs, rhs);\n\t\tQuickSort(nums, lhs, mid);\n\t\tQuickSort(nums, mid + 1, rhs);\n    }\n    \n    public static void Swap(int[] nums, int lhs, int rhs) {\n    \tint temp = nums[lhs];\n    \tnums[lhs] = nums[rhs]; \n    \tnums[rhs] = temp;\n    }\n    \n    public static int Partition(int[] nums, int lhs, int rhs) {\n    \tint pivot = nums[lhs];\n    \twhile(lhs < rhs) {\n            while (lhs < rhs && nums[rhs] >= pivot) rhs--;\n            Swap(nums, lhs, rhs);\n            while (lhs < rhs && nums[lhs] <= pivot) lhs++;\n            Swap(nums, rhs, lhs);\n    \t}\n    \tnums[lhs] = pivot;\n    \treturn lhs;\n    }\n```
[]