Advertisements
Advertisements
Question
Name a data structure that follows LIFO principle and one that follows FIFO principle.
Short Answer
Advertisements
Solution
LIFO architecture : Stack
FIFO architecture : Queue
Explanation: The stack is a data structure that allows for insertion and deletion from the top, with the piece placed at the end coming out first. The queue data structure resembles practical queues in the real world. The element that comes first gets served first.
shaalaa.com
Is there an error in this question or solution?
