Solution: Minimum Area Rectangle
Let’s solve the Minimum Area Rectangle problem using the Math and Geometry pattern.
Statement
You are given an array of points, where point[i]
Your task is to determine the minimum area of a rectangle that can be formed using any four points where the rectangle’s sides are aligned parallel to the X and Y axes. If no such rectangle can be formed, return
Constraints:
points.length
points[i].length
...
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.