(String[] args)
| 57 | } |
| 58 | |
| 59 | public static void main(String[] args) { |
| 60 | int[][] matrix = {{15, 30, 50, 70, 73}, |
| 61 | {35, 40, 100, 102, 120}, |
| 62 | {36, 42, 105, 110, 125}, |
| 63 | {46, 51, 106, 111, 130}, |
| 64 | {48, 55, 109, 140, 150}}; |
| 65 | |
| 66 | AssortedMethods.printMatrix(matrix); |
| 67 | int m = matrix.length; |
| 68 | int n = matrix[0].length; |
| 69 | |
| 70 | int count = 0; |
| 71 | int littleOverTheMax = matrix[m - 1][n - 1] + 10; |
| 72 | for (int i = 0; i < littleOverTheMax; i++) { |
| 73 | Coordinate c = findElement(matrix, i); |
| 74 | if (c != null) { |
| 75 | System.out.println(i + ": (" + c.row + ", " + c.column + ")"); |
| 76 | count++; |
| 77 | } |
| 78 | } |
| 79 | System.out.println("Found " + count + " unique elements."); |
| 80 | } |
| 81 | |
| 82 | } |
nothing calls this directly
no test coverage detected