(arr []T)
| 3 | import "github.com/TheAlgorithms/Go/constraints" |
| 4 | |
| 5 | func Shell[T constraints.Ordered](arr []T) []T { |
| 6 | for d := int(len(arr) / 2); d > 0; d /= 2 { |
| 7 | for i := d; i < len(arr); i++ { |
| 8 | for j := i; j >= d && arr[j-d] > arr[j]; j -= d { |
| 9 | arr[j], arr[j-d] = arr[j-d], arr[j] |
| 10 | } |
| 11 | } |
| 12 | } |
| 13 | return arr |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected