Java easy very easy solution, single loop and just if else condition..
\nclass Solution {\n    public int countGoodRectangles(int[][] rectangles) {\n     int max=0;\n        int count=0;\n        for(int i=0;i<rectangles.length;i++
```\nclass Solution {\n    public int countGoodRectangles(int[][] rectangles) {\n     int max=0;\n        int count=0;\n        for(int i=0;i<rectangles.length;i++){\n            int min=Math.min(rectangles[i][0],rectangles[i][1]); \n            if(max<min){\n                max=min;\n                count=1;\n            }\n            else if(max==min){\n                count++;\n            }\n            else{\n                continue;\n            }    \n        }\n        return count;\n    }\n}\n```
['Java']