Topic: Data Structures
In a priority queue, insertion and deletion can be done at
- A. Front
- B. Back
- C. Middle
- D. Any position
Answer: D. Any position
Explanation: Unlike a standard queue which strictly follows FIFO (insertion at rear, deletion at front), a priority queue places and removes elements based on their priority. Depending on the underlying implementation (like a sorted linked list or array), insertion or deletion can technically happen at any position to maintain or fetch the highest priority item.