Leetcode 2102. Sequentially Ordinal Rank Tracker
Maintain a dynamic set of uniquely-named locations ordered by score (descending) and name (ascending), supporting insertions and answering the i-th best location on the i-th get call (i increases with each query). The core challenge is to maintain the current top-i prefix online (typically with two heaps or an order-statistics structure) so inserts and successive k-th queries are efficient.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.