Class QuickSort

  • All Implemented Interfaces:

    public class QuickSort
    extends Object
    implements ArraySorter
    Provides an implementation of the quick sort algorithm.
    Middleware Services
    • Constructor Detail

      • QuickSort

        public QuickSort()
    • Method Detail

      • sort

        public void sort​(String[] array,
                         Comparator<String> c)
        Description copied from interface: ArraySorter
        This will sort the supplied string array.
        Specified by:
        sort in interface ArraySorter
        array - To sort
        c - Comparator to sort with
      • sort

        public static void sort​(String[] array,
                                Comparator<String> c,
                                int lo,
                                int hi)
        This will sort the supplied array beginning at the lo index and ending at the hi index, using the quick sort algorithm.
        array - to sort
        c - comparator to sort with
        lo - index to beginning sorting at
        hi - index to stop sorting at