ISRO Scientist/Engineer CSE 2023Data Structures › Not yet assigned to a topic
ISRO Scientist/Engineer CSE 2023 PYQ: In a priority queue, insertion and deletion can be done at
In a priority queue, insertion and deletion can be done at
- AFront
- BBack
- CMiddle
- DAny positionCorrect answer
Answer
(D) Any position
Approach
A priority queue is an abstract data type where each element carries a priority and the element with the highest (or lowest) priority is served first. Because ordering is determined by priority rather than arrival order, elements are not confined to a single fixed end for insertion; a new element may need to be placed at a position that preserves the priority ordering. Thus the most accurate option is that insertion/deletion can occur at any position.
Reviewed by ISRO IQ Editorial Team.