public final class QuickSort extends Object implements IndexedSorter
| 构造器和说明 |
|---|
QuickSort() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 IndexedSorterIndexedSortable.compare(int, int),
IndexedSortable.swap(int, int)public void sort(IndexedSortable s)
sort 在接口中 IndexedSorterCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.