Question bank › Queue
Dsa Queue Warm-up

Data Stream Chunker

You are receiving a stream of data characters. You must group them into chunks of size K. As soon as you have K characters in your buffer, you 'flush' the chunk. Any remaining characters at the end of the stream that don't form a full chunk should be labeled as 'Remaining'. Example: Input: 3 7 A B C D E F G Output: ABC DEF Remaining: G

Key concepts

queuebatching

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.