Skip to content

Instantly share code, notes, and snippets.

@Deathnerd
Created April 2, 2014 00:57
Show Gist options
  • Save Deathnerd/9926096 to your computer and use it in GitHub Desktop.
Save Deathnerd/9926096 to your computer and use it in GitHub Desktop.
public int maxSub(int m) {
int x = A[0][0];
int index = 0;
for (int i = 1; i <= m; i++) {
if (A[i/A.length][i%A.length] > x) {
x = A[i/A.length][i%A.length];
index = i;
}
}
return index;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment