[ALGORITHM] LeetCode 1725. Number Of Rectangles That Can Form The Largest Square
ALGORITHM Übung - LeetCode
- 알고리즘 문제 풀이를 통한 코딩 테스트 연습
문제
코드
class Solution(object):
def countGoodRectangles(self, rectangles):
rect_list = [min(rectangle) for rectangle in range(rectangles)]
maxLen = max(rect_list)
result = 0
return sum([i for i in rect_list if maxLen == i])