Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 497. Random Point in Non-overlapping Rectangles
Given non-overlapping axis-aligned rectangles, pick a uniformly random integer point from their union by treating each rectangle's count of integer lattice points as its weight, sampling a rectangle with probability proportional to that count (via prefix sums and binary search), then uniformly selecting integer coordinates inside the chosen rectangle.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.