Company: Cisco_Code with Cisco_26 june 2026

Difficulty: medium

Problem Statement

Shared context — identical in all four questions in this set. The scenario and artifacts below are exactly the same across all four questions; only the Question section changes. If you have already read them in another question, skip straight to Question . A priority queue must support two operations: insert(item, priority) — add an item. extract_min() — remove and return the item with the smallest priority value. Three candidate backing structures are proposed: A. Unsorted array/list: append on insert; scan for the min on extract. B. Sorted array/list: keep elements sorted by priority. C. Binary heap: the usual array-backed min-heap. Question Suppose a workload does a huge number of inserts but only occasionally calls extract (items pile up, and only rarely does something urgent get pulled out). Which of the three structures fits best here, and what's the reasoning? Provided Artifacts Operations: insert(item, priority) , extract_min() . Candidates: A unsorted, B sorted, C binary heap.

More Cisco_Code with Cisco_26 june 2026 OA questionsInterview experiences