Skip to main content

Practice · 1 of 3

Order Statistics Dispatch

CHALLENGE
Difficulty: advanced+25 XP

**Problem.** q ops: "1 x" inserts value x into the multiset; "2 k" prints the k-th smallest value (guaranteed to exist). **Constraints:** 1 <= q <= 300000; 1 <= x <= 1e6; at most 200000 inserts before any k-th query. Sort-per-query is the classic near-miss here.

Back to lesson: Practice: Mixed Drill — Structures and Graphs