Created
June 26, 2016 14:23
This file contains hidden or 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 static void main(String... args) { | |
int[] data = new int[100_000]; | |
Random random = new Random(); | |
for (int i = 0; i< 100_000; i++) { | |
data[i] = random.nextInt(); | |
} | |
int max = Integer.MIN_VALUE; | |
for (int x : data) { | |
max = Math.max(max, x); | |
} | |
System.out.println(max); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment