function getMid(arr, left, right) { let mid = arr[left]; while(left<right) { while(left<right && arr[right]>=mid) right--; let temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; while(left<right && arr[left]<=mi...