Google L4 Onsite - Round 2

google logo
google
SDE II
June 9, 20253 reads

Summary

I had an onsite interview for a Google L4 role, where I faced a challenging geometry problem requiring me to find a vertical line dividing total area of non-overlapping rectangles. Despite identifying an optimized approach and writing code, I missed edge cases due to time constraints, and I am currently awaiting feedback.

Full Experience

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.

Interview Questions (1)

Q1
Vertical Line to Divide Rectangle Areas Equally
Data Structures & AlgorithmsHard

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.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!