LeetCode 497 - Random Point in Non-overlapping Rectangles
LeetCode Problem 497 Difficulty: 🟡 Medium Topics: Array, Math, Binary Search, Reservoir Sampling, Prefix Sum, Ordered Set, Randomized Solution Problem Understanding The problem asks us to randomly pick an integer point from a set of non-overlapping rectangles in 2D space. Each rectangle is defined by its bottom-left (ai, bi) and top-right (xi, yi) corners. The goal is to ensure that every integer point inside the union of all rectangles has...