code: protected static void quickSort(Instances insts, int[] indices, int attidx, int left, int right) {
  
      if (left < right) {
        int middle = partition(insts, indices, attidx, left, right);
        quickSort(insts, indices, attidx, left, middle);
        quickSort(insts, indices, attidx, middle + 1, right);
      }
    }
docs: Sorts the instances according to the given attribute/dimension.
  The sorting is done on the master index array and not on the
  actual instances object.
  
  @param insts The instances on which the tree is (or is
  to be) built.
  @param indices The master index array containing indices
  of the instances.
  @param attidx The dimension/attribute based on which
  the instances should be sorted.
  @param left The begining index of the portion of the master
  index array that needs to be sorted.
  @param right The end index of the portion of the master index
  array that needs to be sorted.