✅C++ || Simple && Straightforward || EASY
\n\nn==r.size()\nT->O(n) && S->O(1)\n\n\tclass Solution {\n\tpublic:\n\t\tint countGoodRectangles(vector>& r) {\n\t\t\tint m=INT_MIN,count=0;\n\t\t\tfor(int i=0
![image](https://assets.leetcode.com/users/images/f2256317-9dc3-47ad-8997-69a556d85ee1_1657308669.9279237.png)\n\n**n==r.size()\nT->O(n) && S->O(1)**\n\n\tclass Solution {\n\tpublic:\n\t\tint countGoodRectangles(vector<vector<int>>& r) {\n\t\t\tint m=INT_MIN,count=0;\n\t\t\tfor(int i=0;i<r.size();i++) m=max(min(r[i][0],r[i][1]),m);  \n\t\t\tfor(int i=0;i<r.size();i++){\n\t\t\t\tif(m==min(r[i][0],r[i][1]))count++;\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t};
['C', 'C++']