public final class QuickSort extends Object implements IndexedSorter
| Constructor and Description |
|---|
QuickSort() |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
getMaxDepth(int x)
Deepest recursion before giving up and doing a heapsort.
|
void |
sort(IndexedSortable s) |
void |
sort(IndexedSortable s,
int p,
int r)
Sort the given range of items using quick sort.
|
protected static int getMaxDepth(int x)
public void sort(IndexedSortable s, int p, int r)
getMaxDepth(int), then switch to HeapSort.sort in interface IndexedSorterIndexedSortable.compare(int, int),
IndexedSortable.swap(int, int)public void sort(IndexedSortable s)
sort in interface IndexedSorterCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.