Stack and Queue
Stack
Stack is a collection data structure which has two
fundamental operation: push and pop.
The data are stored in Last
In First Out (LIFO) way.
Stack can be implemented using array or linked list
Implementing stack using array is much “easier” than
using linked list.
Queue
Queue is a collection data structure which has two
fundamental operation: push and pop
(similar to stack).
The data are stored in First
In First Out (FIFO) way, this is the main difference
between stack and
queue.
Komentar
Posting Komentar