the array and move toward each otherstopping and swapping as they go the bars between them are unpartitionedthose they've already passed over are partitioned when they meetthe entire array is partitioned handling unusual data if we were sure that there was data item at the right end of the array that was smaller than the pivot valueand an item at the left end that was largerthe simplified while loops previously shown would work fine unfortunatelythe algorithm may be called upon to partition data that isn' so well organized if all the data is smaller than the pivot valuefor examplethe leftptr variable will go all the way across the arraylooking in vain for larger itemand fall off the right endcreating an array index out of bounds exception similar fate will befall rightptr if all the data is larger than the pivot value to avoid these problemsextra tests must be placed in the while loops to check for the ends of the arrayleftptrleft in the second you can see these tests in context in listing in the section on quicksortwe'll see that clever pivot-selection process can eliminate these end-of-array tests eliminating code from inner loops is always good idea if you want to make program run faster delicate code the code in the while loops is rather delicate for exampleyou might be tempted to remove the increment operators from the inner while loops and use them to replace the nop statements (nop refers to statement consisting only of semicolonand means no operationfor exampleyou might try to change thiswhile(leftptr right &thearray[++leftptrpivot/(nopto thiswhile(leftptr right &thearray[leftptrpivot++leftptrand similarly for the other inner while loop these changes would make it possible for the initial values of the pointers to be left and rightwhich is somewhat clearer than left- and right+ howeverthese changes result in the pointers being incremented only when the condition is satisfied the pointers must move in any caseso two extra statements within the outer while loop would be required to bump the pointers the nop version is the most efficient solution