Method to find the next gap @param gap the current gap @return the next gap value
(int gap)
| 25 | * @return the next gap value |
| 26 | */ |
| 27 | private int getNextGap(int gap) { |
| 28 | gap = (int) (gap / SHRINK_FACTOR); |
| 29 | return Math.max(gap, 1); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Method to sort the array using CombSort |