C++ solution || O(n) || Using Map
\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rectangles) {\n        int max_area=0;\n        unordered_map<int,int>m;\n        
```\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rectangles) {\n        int max_area=0;\n        unordered_map<int,int>m;\n        for(int i=0;i<rectangles.size();i++)\n        {\n            int l=rectangles[i][0];\n            int w=rectangles[i][1];\n            int mini=min(l,w);\n            max_area=max(mini,max_area);\n            m[mini]++;\n        }\n        return m[max_area];\n    }\n};\n```
['C']