[JAVA] easy and %100 solution
if you like it pls upp vote\n\nJAVA\n\n\nclass Solution {\n    public int countGoodRectangles(int[][] rectangles) {\n        int max = 0;\n        int res = 0;\
if you like it pls upp vote\n\nJAVA\n\n```\nclass Solution {\n    public int countGoodRectangles(int[][] rectangles) {\n        int max = 0;\n        int res = 0;\n        for(int i = 0;i< rectangles.length;i++){\n            int key = Math.min(rectangles[i][0],rectangles[i][1]);\n            if(key > max){\n                res = 1;\n                max = key;\n            }\n            else if (key == max){\n                res++;\n            }\n        }\n        \n        return res;\n    }\n}\n```
['Java']