Tap here to switch tabs
Problem
Submissions

Problem: Maximum Area of Longest Diagonal Rectangle

med
30 min
Try to solve the Maximum Area of Longest Diagonal Rectangle problem.

Statement

You are given a 22D integer array dimensions of size nn, where dimensions[i] contains two integers representing the length and width of the ii-th rectangle.

Return the area of the rectangle that has the longest diagonal. If multiple rectangles tie for the longest diagonal length, return the maximum area among those rectangles.

Constraints:

  • 1≤1 \leq dimensions.length ≤100\leq 100

  • dimensions[i].length =2= 2

  • 1≤1 \leq dimensions[i][0], dimensions[i][1] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Area of Longest Diagonal Rectangle

med
30 min
Try to solve the Maximum Area of Longest Diagonal Rectangle problem.

Statement

You are given a 22D integer array dimensions of size nn, where dimensions[i] contains two integers representing the length and width of the ii-th rectangle.

Return the area of the rectangle that has the longest diagonal. If multiple rectangles tie for the longest diagonal length, return the maximum area among those rectangles.

Constraints:

  • 1≤1 \leq dimensions.length ≤100\leq 100

  • dimensions[i].length =2= 2

  • 1≤1 \leq dimensions[i][0], dimensions[i][1] ≤100\leq 100