Skip to content

Instantly share code, notes, and snippets.

@hmaurer
Last active August 29, 2015 13:55
Show Gist options
  • Save hmaurer/8734114 to your computer and use it in GitHub Desktop.
Save hmaurer/8734114 to your computer and use it in GitHub Desktop.
// Index of maximum: j
int j = 0;
for (int i = 1; i < array.length; i++) {
if (array[i] > array[j]) j = i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment