private T selectPivot(int from,int to){
  int count=(int)(6 * Math.log10(to - from));
  count=Math.min(count,temp.length);
  int step=(to - from) / count;
  for (int i=from, j=0; i < to; i+=step, j++) {
    temp[j]=data[i];
  }
  T pivot=select(temp,0,count - 1,count / 2);
  return pivot;
}

private T selectPivot ( int from , int to ) { int count = ( int ) ( 6 * Math . log10 ( to - from ) ) ; count = Math . min ( count , temp . length ) ; int step = ( to - from ) / count ; for ( int i = from , j = 0 ; i < to ; i += step , j ++ ) { temp [ j ] = data [ i ] ; } T pivot = select ( temp , 0 , count - 1 , count / 2 ) ; return pivot ; }
select a pivot . to ensure a good pivot is select , the median element of a sample of the data is calculated .
