Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3027. Find the Number of Ways to Place People II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source