Tap here to switch tabs
Problem
Submissions

Problem: Maximum Area of Longest Diagonal Rectangle

Given an array of rectangles, Maximum Area of Longest Diagonal Rectangle asks you to return the greatest area among those with the longest diagonal.

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

Given an array of rectangles, Maximum Area of Longest Diagonal Rectangle asks you to return the greatest area among those with the longest diagonal.

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