advanced sorting listing continued //public void quicksort(recquicksort( nelems- )//public void recquicksort(int leftint rightif(right-left < /if size < return/already sorted else /size is or larger long pivot thearray[right]/rightmost item /partition range int partition partitionit(leftrightpivot)recquicksort(leftpartition- )/sort left side recquicksort(partition+ right)/sort right side /end recquicksort(//public int partitionit(int leftint rightlong pivotint leftptr left- /left (after ++int rightptr right/right- (after --while(true/find bigger item whilethearray[++leftptrpivot /(nop/find smaller item while(rightptr &thearray[--rightptrpivot/(nopif(leftptr >rightptr/if pointers crossbreak/partition done else /not crossedso swap(leftptrrightptr)/swap elements /end while(trueswap(leftptrright)/restore pivot return leftptr/return pivot location /end partitionit(/