choosing pivot value what pivot value should the partitionit(method usehere are some relevant ideasthe pivot value should be the key value of an actual data itemthis item is called the pivot you can pick data item to be the pivot more or less at random for simplicitylet' say we always pick the item on the right end of the subarray being partitioned after the partitionif the pivot is inserted at the boundary between the left and right subarraysit will be in its final sorted position this last point may sound unlikelybut remember thatbecause the pivot' key value is used to partition the arrayfollowing the partition the left subarray holds items smaller than the pivotand the right subarray holds items larger the pivot starts out on the rightbut if it could somehow be placed between these two subarraysit would be in the correct place--that isin its final sorted position figure shows how this looks with pivot whose key value is unpartitioned array pivot item correct place for pivot partitioned left subarray figure partitioned right subarray the pivot and the subarrays this figure is somewhat fanciful because you can' actually take an array apart as we've shown so how do we move the pivot to its proper placewe could shift all the items in the right subarray to the right one cell to make room for the pivot howeverthis is inefficient and unnecessary remember that all the