A standard linear queue removes elements according to which principle?
2025
A standard linear queue removes elements according to which principle?
Answer: B. FIFO (First In, First Out) — ConceptA linear queue has two working ends: insertion (enqueue) occurs at the rear, while removal (dequeue) occurs at the front. Therefore, elements leave in…
- A.
Random-order removal
- B.
FIFO (First In, First Out)
- C.
Priority-based removal
- D.
LIFO (Last In, First Out)
Attempted by 1195 students.
Show answer & explanation
Correct answer: B
Concept
A linear queue has two working ends: insertion (enqueue) occurs at the rear, while removal (dequeue) occurs at the front. Therefore, elements leave in their arrival order; this discipline is called First In, First Out (FIFO).
Application
Suppose A, B, and C are enqueued in that order. The front is A and the rear is C.
The first dequeue operation removes A, the earliest inserted element; later dequeue operations remove B and then C.
Contrast
Random-order removal selects without using arrival position, so it does not preserve a fixed arrival-order discipline.
Priority-based removal chooses by assigned priority, so insertion time alone does not determine removal order.
LIFO removes the latest arrival first, which is the discipline used by a stack.
Cross-check
The simulated removal order A, B, C is identical to the insertion order A, B, C, confirming FIFO behavior.
Result
The standard linear queue principle is FIFO (First In, First Out).