Question:

Which data structure uses the FIFO (First In, First Out) principle?

Show Hint

A great way to remember the difference: Stack is like a stack of plates (you take the top one off first - Last In, First Out). Queue is like a queue of people (the first person in line gets served first - First In, First Out).
Updated On: Jul 2, 2026
  • Stack
  • Queue
  • Linked List
  • Tree
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Let's analyze the access principles of the given data structures:
(A) Stack: A stack operates on the LIFO (Last In, First Out) principle. The last element added to the stack is the first one to be removed. Think of a stack of plates.
(B) Queue: A queue operates on the FIFO (First In, First Out) principle. The first element added to the queue is the first one to be removed. Think of a line of people waiting for a bus.
(C) Linked List: A linear data structure where access depends on the type of list. You can insert or delete from the beginning, end, or middle, so it doesn't inherently follow a single principle like FIFO or LIFO.
(D) Tree: A non-linear, hierarchical data structure. Traversal can be done in various orders (pre-order, in-order, post-order), none of which are strictly FIFO or LIFO.
The data structure that uses the FIFO principle is the Queue.
Was this answer helpful?
0
0