private int partition(int array[], int l, int h) {
    int povit = array[l];
    while (l < h) {
      while (l < h && array[h] >= povit) {
        h--;
      }
      array[l] = array[h];
      while (l < h && array[l] < povit) {
        l++;
      }
      array[h] = array[l];
    }
    array[l] = povit;
    return l;
  }