Skip to content

Instantly share code, notes, and snippets.

@KhoaVanNguyen

KhoaVanNguyen/Min and Max 1 Secret

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;
if (x > max) max = X;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.