✅ C++ | Easy Code | Map | O(N)
Complexity\n- Time complexity: O(N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(N)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rectangles) {\n        int ans = 0;\n        unordered_map<int,int> m;\n        for(int i = 0; i < rectangles.size(); i++)\n        {\n            int tmp;\n            ans = max(ans,tmp =  min(rectangles[i][0], rectangles[i][1]));\n            m[tmp]++;\n        }\n        return m[ans];\n    }\n};\n```
['Array', 'Ordered Map', 'C++']