Sliding Window Top-K Elements

Phone ScreenCitadelLast reported June 2026Low Frequency
Reported
1× across candidate reports
First seen
June 2026
Last reported
June 2026
Reported outcome
unknown

Problem Overview

Given an array and a window size w, slide the window across the array one element at a time. For each window, return the top K largest elements in it, not just the maximum. An example of ours (the report gives none): The naive answer copies each window, sorts it…

  • The rest of the problem statement — full requirements, constraints, and edge cases
  • Approach and trade-offs — what passing candidates did, and the mistakes that sink people
Unlock the full Citadel catalog
Full problem statements, candidate-reported follow-ups, and walkthroughs — for every Citadel question.
Unlock with Pro
Already a member? Sign in
Verified Source
Every question is reconstructed from multiple independent candidate reports. Verbatim follow-ups, not invented ones.
Codex Fact-Checked
Technical claims, formulas, and scale numbers are reviewed against primary sources.
Interviewer Follow-ups
The exact follow-ups reported by candidates, with the trigger that prompts each one — plus the mistakes that sink people.
Is this helpful?