Question bank › Queue
Dsa Queue Medium

Document Processing Queue

You are tasked with simulating a document processing queue. Each document can take a varying amount of time to process, and you want to find out how long it will take to process a series of documents in order. Input Format: - The first line contains an integer N (1 <= N <= 1000), the number of documents. - The next N lines each contain a string representing the document name followed by an integer indicating the time it takes to process the document (1 <= time <= 100). Output Format: - Print a single integer representing the total time it takes to process all documents. Example: Input: 3 Document1 2 Document2 3 Document3 1 Output: 6

Key concepts

queuedata structurestring manipulation

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.