Created
April 2, 2014 00:57
-
-
Save Deathnerd/9926096 to your computer and use it in GitHub Desktop.
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 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