1
# Runtime: 239 ms (Top 76.52%) | Memory: 14.6 MB (Top 25.99%)5
def countGoodRectangles(self, rectangles: List[List[int]]) -> int:7
# Runtime: 184 ms, faster than 65.71% of Python3 online submissions8
# Memory Usage: 14.9 MB, less than 39.90% of Python3 online submissions15
for l, w in rectangles:17
minSide = min(l, w) # Gets minSide of each rectangle19
if minSide > maxLen: # Checks if rectangle holds new maxLen20
maxLen = minSide # Tracks the current maxLen22
res.append(minSide) # Holds each rectangles minSIde26
) # Returns the count of rectangles whos minSide is equal to maxLen