Available question text
Maintain an array-backed stream of n (id, value) pairs arriving out of order and, on each insert, return the largest contiguous chunk of values starting from the next expected id so that all returned chunks concatenate to the values sorted by id. Essentially: support inserts that may fill gaps and advance a pointer to emit consecutive stored values in increasing id order.
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
Citadel
Leetcode 1656. Design an Ordered Stream
Reported Oct 22, 2026 · 1 source report
SENIOR
Source snapshot: Nov 12, 2026
View source