func sortArray(nums []int) []int {
quickSort(nums, 0, len(nums)-1)
return nums
}
func quickSort(nums []int, low, high int){
if low<high{
var pivot = partition(nums, low, high)
quickSort(nums, low, pivot-1)
quickSort(nums, pivot+1, high)
}
}
func partition(arr []int, low, high int)int{
var pivot = arr[low]
for low<high{
for low<high&&arr[high]>=pivot{
high--
}
arr[low] = arr[high]
for low<high&&arr[low]<=pivot{
low++
}
arr[high] = arr[low]
}
arr[low] = pivot
return low
}