Stacks are Node-based data structures with some similarities to and some distinctions from linked lists. Nodes have references to the subsequent node.
Stack vocabulary:
Push into the stack
Pop out of a stack
Top of the stack is the most recently pushed node (and first to be popped out)
Peek at the top of the stack
Stack principles:
First-in, last-out (and vice-versa)
Bottom node references “null”
Queues are another “directional” data structure.
Common queue vocabulary:
Enque nodes to add to the queue
Dequeue nodes to remove from queue
Front first Node
Rear last Node
Peek at the front Node’s held value
Queue principles:
First-in, first-out
Last-in, Last-out