Google L4 Pre Screen Interview | Bangalore | Failed

Question:
You are given n points on the coordinate plane. Write a program which calculates the largest possible area of a rectangle such that each of its vertices is one of the given points.

It was this same problem: https://dmoj.ca/problem/btoi09p4

What do you guys think about this problem?

I was not able to figure out how to validate if 4 points make a rectangle or not. This problem is so much more maths than coding, and the optimzation is even crazier.

Comments (5)