/quicksort if large double median medianof (leftright)int partition partitionit(leftrightmedian)recquicksort(leftpartition- )recquicksort(partition+ right)/end recquicksort(//public double medianof (int leftint rightint center (left+right)/ /order left center ifthearray[leftthearray[centerswap(leftcenter)/order left right ifthearray[leftthearray[rightswap(leftright)/order center right ifthearray[centerthearray[rightswap(centerright)swap(centerright- )return thearray[right- ]/end medianof (/put pivot on right /return median value //public void swap(int dex int dex /swap two elements double temp thearray[dex ]/ into temp thearray[dex thearray[dex ]/ into thearray[dex temp/temp into /end swap//public int partitionit(int leftint rightdouble pivotint leftptr left/right of first elem int rightptr right /left of pivot while(truewhile(thearray[++leftptrpivot/find bigger /(nopwhile(thearray[--rightptrpivot/find smaller /(nopif(leftptr >rightptr/if pointers crossbreak/partition done else /not crossedso