code: private static <E extends Comparable<E>> int partition(List<E> list, int start, int end) {
          E pivot = list.get(end);
          int index = start - 1;
          
          for(int j = start; j < end; j++) {
              if(list.get(j).compareTo(pivot) <= 0) {
                  index++;
                  TrivialSwap.swap(list, index, j);
              }
          }
          
          TrivialSwap.swap(list, index + 1, end);
          
          return index + 1;
      }
docs: Routine that arranges the elements in ascending order around a pivot. This routine
  runs in O(n) time.
  
  @param <E> the type of elements in this list.
  
  @param list array that we want to sort
  @param start index of the starting point to sort
  @param end index of the end point to sort
  
  @return an integer that represent the index of the pivot