10035. Maximum Area of Longest Diagonal Rectangle
You are given a 2D 0-indexed integer array
dimensions
.For all indices
i
,0 <= i < dimensions.length
,dimensions[i][0]
represents the length anddimensions[i][1]
represents the width of the rectanglei
.Return the area of the rectangle having the longest diagonal. If there are multiple rectangles with the longest diagonal, return the area of the rectangle having the maximum area.
1 | class Solution { |