MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / getNextGap

Function getNextGap

sort/combSort.go:11–17  ·  view source on GitHub ↗
(gap int)

Source from the content-addressed store, hash-verified

9import "github.com/TheAlgorithms/Go/constraints"
10
11func getNextGap(gap int) int {
12 gap = (gap * 10) / 13
13 if gap < 1 {
14 return 1
15 }
16 return gap
17}
18
19// Comb is a simple sorting algorithm which is an improvement of the bubble sorting algorithm.
20func Comb[T constraints.Ordered](data []T) []T {

Callers 1

CombFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected