Java quick sort beat 95% time; time:O(nlogn)
\nclass Solution {\n    public int[] sortArray(int[] nums) {\n        \n        if (nums.length == 0) { return nums;}\n        \n        QuickSort(nums, 0, nums
```\nclass Solution {\n    public int[] sortArray(int[] nums) {\n        \n        if (nums.length == 0) { return nums;}\n        \n        QuickSort(nums, 0, nums.length - 1);\n        return nums;\n        \n    }\n    \n    private void QuickSort(int[] nums, int start, int end) {\n        \n        if(start >= end) return;\n        \n        int pivot = nums[(start + end)/2];\n        int left = start, right = end;\n\n        while (left <= right) {\n            while (left <= right && nums[left] < pivot ) {\n            left++;\n            }\n        \n            while (left <= right && nums[right] > pivot) {\n            right--;\n            }\n            \n            if(left <= right) {\n                int temp;\n                temp = nums[left];\n                nums[left] = nums[right];\n                nums[right] = temp;\n                \n                left++;\n                right--;\n            }\n        }\n        \n       QuickSort(nums, start, right);\n       QuickSort(nums, left, end);\n        \n        \n    }\n    \n```
['Java']