Class 10 Summary :
Stacks and Queues :
What is a Stack ?
- “is a data structure that consists of nodes. each node references the next node in the stack, but does not reference its previous.
Stack Terminology :
- Push .
- Pop.
- Top.
- Peek.
- IsEmpty.
Stacks Concepts :
- FILO ( First In Last Out)
- LIFO (Last In First Out)
Stack Visualization :
What is a Queue ?
- “a queue is a collection of entities that are maintained in a sequence and can be modified by the addition of entities at one end of the sequence and the removal of entities from the other end of the sequence”.
Queue Terminology :
- Enqueue.
- Dequeue.
- Front.
- Rear.
- Peek.
- IsEmpty
Queue concepts :
- FIFO (First In First Out)
- LILO (Last In Last Out)
Queue Visualization :
Sources :
source1
source2