Number Of Rectangles That Can Form The Largest Square Solution in C++
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)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rectangles) {\n        int i, j, min, m=0, count=0;\n        for(i=0 ; i<rectangles.size() ; i++)\n        {\n            min = *min_element(rectangles[i].begin() , rectangles[i].end());\n            if(min>m)\n            {\n                m = min;\n                count = 0;\n            }\n            if(min==m)\n            {\n                count++;\n            }\n        }\n        return count;\n    }\n};\n```
['C++']