Google L4 Onsite - Round 2

Anonymous User
2000
Jun 09, 2025
Jun 09, 2025

Question
Gven set of points in cartesian plane representing rectangles, find a vertical line defined by it's x co-oardinate which divides the plane into two halfs of equal total areas.

NOTE:
Given rectangles cannot overlap with each other.
The veritical line should pass through the rectangles.

It was an open ended question and things were expected to get clarified by asking questions. Interviewer didn't give any example and I was the one supposed to come up with example. It took 5-10 minutes even to undestand the question, then I explained brute force and optimised approach using binary search with sorting with O(NlogN) time complexity. Only last 20 minutes were left to code and the question was very implementation heavy and I wrote the code but missed few edge cases and time was up. I wish I could have understood the question fast enough to save enough time for coding at the end.

The question was of medium hard level to solve in 35 minutes as (10 minutes was reserved for intro and questions at the end). I am waiting for the feedback from recuiter, it seems I might get H/LH.

Comments (9)