code: public static <E extends Comparable<E>> void recursiveQuickSort(List<E> array, int startIdx,
        int endIdx) {
  
      int idx = partition(array, startIdx, endIdx);
  
      // Recursively call quicksort with left part of the partitioned array
      if (startIdx < idx - 1) {
        recursiveQuickSort(array, startIdx, idx - 1);
      }
  
      // Recursively call quick sort with right part of the partitioned array
      if (endIdx > idx) {
        recursiveQuickSort(array, idx, endIdx);
      }
    }
docs: Recursive quicksort logic.
  
  @param array    input array
  @param startIdx start index of the array
  @param endIdx   end index of the array
  @param <E>      generic type of list