* * Shell sort - http://en.wikipedia.org/wiki/Shellsort */
(arr []int)
| 4 | * Shell sort - http://en.wikipedia.org/wiki/Shellsort |
| 5 | */ |
| 6 | func ShellSort(arr []int) { |
| 7 | for d := int(len(arr)/2); d > 0; d /= 2 { |
| 8 | for i := d; i < len(arr); i++ { |
| 9 | for j := i; j >= d && arr[j-d] > arr[j]; j -= d { |
| 10 | arr[j], arr[j-d] = arr[j-d], arr[j] |
| 11 | } |
| 12 | } |
| 13 | } |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected