Home » Interview » Technology

Difference between Stack and Queue

Correct Answer: Stack is a collection of objects that works in LIFO (Last in First out) mechanism while Queue is FIFO (First in First out) This means that the object that is inserted first is removed last in a stack while an object that is inserted first is removed first in a queue

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion