Constructor | Description |
---|---|
MySort() |
Modifier and Type | Method | Description |
---|---|---|
private static void |
hSort(java.lang.Comparable[] array,
int h) |
Produce insertion sort with a stepProduce insertion sort with a step
|
static void |
sort(java.lang.Comparable[] array) |
Produced by sorting Shell the input array with a step of 3
|
java.lang.Object[] |
sort(java.lang.Object[] elementData,
int size) |
Prepares the input array of objects to sort and using a method "run" that sorts it.
|
private static void |
swap(java.lang.Comparable[] array,
int i,
int j) |
Swap the array elements
|
private static void hSort(java.lang.Comparable[] array, int h)
array
- Array objectsh
- steppublic static void sort(java.lang.Comparable[] array)
array
- Array objectspublic java.lang.Object[] sort(java.lang.Object[] elementData, int size)
private static void swap(java.lang.Comparable[] array, int i, int j)
array
- Array objectsi
- Position item1j
- Position item2