Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3454. Separate Squares II
Given axis-aligned squares (overlaps counted once), find the minimum y-coordinate of a horizontal line that splits the union area into equal halves. The core challenge is computing the union area below a candidate y (accounting for overlaps) and using its monotonicity to locate the y where that area equals half the total.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early September, 2024
Mid-level
Find a line parallel to y-axis that divides all given rectangles into equal halves
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.