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 finalIndex=1; | |
| int index = 0; | |
| for (int i = 1; i <= m; i++) { | |
| for (int j = 0; j < A.length; j++) { | |
| index++; | |
| int row = (index / size); | |
| int column = (index % size)-1; | |
| System.out.println("Row= ("+index+"/"+size+")="+row); |
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
| void bubbleSort(){ | |
| bubbleSort(n-1, n-1); | |
| } | |
| void bubbleSort(int y, int x){ | |
| if(x==0 && y==0) | |
| return; | |
| for(int i=0; i <= n-1; i++){ //loop through the rows | |
| for(int j=0; j<=n-1; j++){ //loop through the columns |
NewerOlder