[Java] Traversal Easy Approach | 1ms | 100%
java []\nclass Solution {\n\tpublic int countGoodRectangles(int[][] rectangles) {\n\t\tint res = 0, max = -1;\n\t\tfor (int[] rect : rectangles) {\n\t\t\tint cu
```java []\nclass Solution {\n\tpublic int countGoodRectangles(int[][] rectangles) {\n\t\tint res = 0, max = -1;\n\t\tfor (int[] rect : rectangles) {\n\t\t\tint cur = Math.min(rect[0], rect[1]);\n\t\t\tif (cur == max) {\n\t\t\t\tres++;\n\t\t\t} else if (cur > max) {\n\t\t\t\tmax = cur;\n\t\t\t\tres = 1;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}\n```
['Java']