1/13
Looks like no tags are added yet.
What is a Stack?
An ADT following LIFO.
What does LIFO mean?
Last In First Out.
Operation used to add to a stack?
push()
Operation used to remove from a stack?
pop()
Operation used to inspect the top of a stack?
peek()
Common real-world use of a stack?
Undo functionality.
What is a Queue?
An ADT following FIFO.
What does FIFO mean?
First In First Out.
Queue insertion operation?
enqueue()
Queue removal operation?
dequeue()
Queue inspection operation?
first()
What is a Circular Queue?
A queue where the rear wraps around to the beginning.
Circular queue formula?
(rear + 1) % queue.length
What is a Priority Queue?
Elements are removed according to priority rather than arrival order.