Number of rectangles that can form the largest square - C solution
\n\n\nint countGoodRectangles(int** rectangles, int rectanglesSize, int* rectanglesColSize){\n    int i,j=0,maxlength=0,count=0;\n    int * a = malloc( rectangl
```\n\n\nint countGoodRectangles(int** rectangles, int rectanglesSize, int* rectanglesColSize){\n    int i,j=0,maxlength=0,count=0;\n    int * a = malloc( rectanglesSize * sizeof(int));\n    for(i=0;i<rectanglesSize;i++){\n        if(rectangles[i][j] <= rectangles[i][j+1]){\n            maxlength = rectangles[i][j];\n        }\n        else{\n            maxlength = rectangles[i][j+1];\n        }\n        a[i]=maxlength;\n    }\n    for(i=0; i<rectanglesSize ;i++){\n        for(j=0 ;j<rectanglesSize; j++){\n            if(a[i] < a[j]){\n                break;\n            }\n            else{   //a[i]>=a[j]\n                if(j==(rectanglesSize-1)){\n                    count++;\n                }\n            }\n        }\n    }\n    return count;\n}\n\n```
['Array']