code: public static <T extends Comparable<? super T>>
      void quickSelect( T[] arr, int k )
      {
          quickSelect( arr, 0, arr.length - 1, k );
      }
docs: quick select algorithm
  
  @param arr an array of Comparable items
  @param k the k-th small index