Difference between stack and queue?
Akshay Amin
Select an image from your device to upload
Key difference between Stack and Queue is how elements are added and removed.
Stack
Queue
Stack : Stack is works on Last in First out (LIFO) principle . Means elements are add and remove only one way .
Queue : Queue is works on First out First out (FIFO) principle . Which means elements are add first into queue is also remove first .