Topic 2 - Stacks and Queues
Stack QueueBags, queues, and stacks are fundamental and broadly useful. They involve collections of objects. Specifically, the set of values is a collection of objects, and the operations revolve around adding, removing, or iterating objects in the collection.
1 stacks¶
Stack API¶
Stack: linked-list representation¶
Maintain pointer to first node in a linked list; insert/remove from front.