MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Int

Function Int

math/min/min.go:6–14  ·  view source on GitHub ↗

Int is a function which returns the minimum of all the integers provided as arguments.

(values ...T)

Source from the content-addressed store, hash-verified

4
5// Int is a function which returns the minimum of all the integers provided as arguments.
6func Int[T constraints.Integer](values ...T) T {
7 min := values[0]
8 for _, value := range values {
9 if value < min {
10 min = value
11 }
12 }
13 return min
14}

Callers 15

LongestPalindromeFunction · 0.92
MergeIterFunction · 0.92
PigeonholeFunction · 0.92
QueryMethod · 0.92
UpdateMethod · 0.92
articulationPointHelperFunction · 0.92
Bin2Function · 0.92
MatrixChainRecFunction · 0.92
MatrixChainDpFunction · 0.92
OptimalBSTFunction · 0.92
EggDroppingFunction · 0.92
EditDistanceRecursiveFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestMinFunction · 0.56
BenchmarkTestMinIntFunction · 0.56