easy understanding JAVA code
Intuition\n Describe your first thoughts on how to solve this problem. \nnew array of min integers, find max in that array with count;\n# Approach\n Describe yo
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nnew array of min integers, find max in that array with count;\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 max[] =new int[rectangles.length];\n        int count=0;//c=0\n        for(int i=0; i<rectangles.length; i++){\n           Arrays.sort(rectangles[i]);//5,8  3,9  3,12;\n          max[i] = rectangles[i][0];//[5,3,3];\n        }\n        Arrays.sort(max);\n         int maxi = max[max.length-1];\n       for(int j=0; j<max.length; j++){\n            if(max[j] == maxi){\n                count ++;\n       }\n       }\n       return count;\n    }\n}\n```
['Java']