Available question text
Given a stream of point insertions on an infinite plane, after each insertion return the k-th smallest Manhattan distance (|x|+|y|) from the origin or -1 if fewer than k points exist. The core challenge is to maintain the k-th order statistic of distances under insert-only updates efficiently (e.g., with a size-k heap or other order-statistic structure) for up to 2e5 queries.
Related questions
Continue with questions that share topics or the same question type.
- Block Placement Queries
Coding · Array · Binary Indexed Tree · Binary Search
- Closest Equal Element Queries
Coding
- Closest Nodes Queries in a Binary Search Tree
Coding
- Cycle Length Queries in a Tree
Coding
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 3275. K-th Nearest Obstacle Queries
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source