public interface ShellSort
Shell sort is based on two observations:
The original implementation performs O(n2) comparisons and exchanges in the worst case. A minor change given in V. Pratt's book improved the bound to O(n log2 n). This is worse than the optimal comparison sorts, which are O(n log n).
| Modifier and Type | Method and Description |
|---|---|
static void |
sort(double[] a)
Sorts the specified array into ascending numerical order.
|
static void |
sort(float[] a)
Sorts the specified array into ascending numerical order.
|
static void |
sort(int[] a)
Sorts the specified array into ascending numerical order.
|
static <T extends java.lang.Comparable<? super T>> |
sort(T[] a)
Sorts the specified array into ascending order.
|
static void sort(int[] a)
static void sort(float[] a)
static void sort(double[] a)
static <T extends java.lang.Comparable<? super T>> void sort(T[] a)