MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / min

Method min

src/main/java/com/thealgorithms/maths/MinValue.java:15–17  ·  view source on GitHub ↗

Returns the smaller of two int values. That is, the result the argument closer to the value of Integer#MIN_VALUE. If the arguments have the same value, the result is that same value. @param a an argument. @param b another argument. @return the smaller of a and b.

(int a, int b)

Source from the content-addressed store, hash-verified

13 * @return the smaller of {@code a} and {@code b}.
14 */
15 public static int min(int a, int b) {
16 return a <= b ? a : b;
17 }
18}

Callers 15

minTestMethod · 0.95
bruteForceOptimalCostMethod · 0.45
minEdgeOnPathMethod · 0.45
zFunctionMethod · 0.45
findTopKFrequentWordsMethod · 0.45
longestPalindromeMethod · 0.45
arrangeMethod · 0.45
findKCentersMethod · 0.45
maxProfitMethod · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by 7

minTestMethod · 0.76
bruteForceOptimalCostMethod · 0.36
minEdgeOnPathMethod · 0.36
compareToMethod · 0.36
solveMethod · 0.36