Skip to content

Instantly share code, notes, and snippets.

@KhoaVanNguyen
Created Jan 15, 2017
Embed
What would you like to do?
int min = Integer.MAX_VALUE;
int max = Integer.MIN_VALUE;
for (int x : array) {
if (x < min)
min = X;
}
for (int x : array) {
if (x > max)
max = X;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment