Leetcode 3027. Find the Number of Ways to Place People II
Count ordered pairs of given points (Alice at the upper-left corner and Bob at the lower-right) such that the axis-aligned rectangle with those corners (possibly degenerate) contains no other points on its boundary or interior. The core challenge is counting empty axis-aligned rectangles under the dominance constraint x_A ≤ x_B and y_A ≥ y_B, a 2D range-counting / sweep-line pattern for efficiency.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.