Last active
January 28, 2020 05:27
-
-
Save Duckuism/17c3fb9b474ecdcffd8ee6463bb13ca2 to your computer and use it in GitHub Desktop.
getMinValueInByteArray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int getMin(byte[] bytes){ | |
int minValue = bytes[0]; | |
for(int i = 0; i<bytes.length; i++){ | |
if(bytes[i] <= minValue){ | |
minValue = bytes[i]; | |
} | |
} | |
return minValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment