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 A workload performs many inserts and few extracts (e.g., buffer lots of items, occasionally pull the most urgent). Which structure is most attractive and why? Provided Artifacts Operations: insert(item, priority) , extract_min() . Candidates: A unsorted, B sorted, C binary heap. Constraints Use array-backed implementations (insertion into a sorte

More Cisco_Code with Cisco_26 june 2026 OA questionsInterview experiences