Class Util
java.lang.Object
topics.divideconquer.utils.Util
Utility class for divide-and-conquer sorting helpers.
Provides the partition operation used by Quicksort and related algorithms.
The partition method rearranges array elements in-place around a pivot so
that all elements to the left are less than or equal to the pivot and all
elements to the right are greater than or equal to the pivot.
- Author:
- vicegd
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
partition
public static int partition(int[] elements, int left, int right)
-