solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int countGoodRectangles(int[][] rectangles) {\n        int[] arr=new int[rectangles.length];\n        for(int i=0;i<rectangles.length;i++)\n        {\n            arr[i]=Math.min(rectangles[i][0],rectangles[i][1]);\n        }\n        int max=0,count=0;\n        for(int i=0;i<arr.length;i++)\n        {\n            if(max<arr[i])\n            max=arr[i];\n        }\n        for(int i=0;i<arr.length;i++)\n        {\n            if(arr[i]==max)\n                count++;\n        }\n        return count;\n    }\n}\n```
['Java']