Updated: 2024-03-12
1 min read
On This Page
class Solution:
def areaOfMaxDiagonal(self, dimensions: List[List[int]]) -> int:
res = mx = 0
for l, w in dimensions:
t = l**2 + w**2
if mx < t:
mx = t
res = l * w
elif mx == t:
res = max(res, l * w)
return res