Nice work — you’ve built out a
Stack class that can:
- add a new item to the top via a
- remove an item from the top and returns its value with a
- return the value of the top item using a
- allows a stack instance to maintain an awareness of its size to prevent stack “overflow”
So how does your code stack up against pizza delivery?
pop() statements at the bottom of your code to see your
Stack class help a pizza delivery place efficiently manage delivering a stack of pizzas.
Sign up to start coding