Implementation: Stacks and Queues
To turn in your reading “Reply” to this discussion by teaching something that you learned. Then review what one of your classmates learned, and leave a comment.
Resources
Stacks and Queues
Reply
Node behavior varies:
- Nodes are to stacks, like Marshawn Lynch is to the gym: First in, Last out.
- Nodes are to queues, like Marshawn Lynch is to media day: Last in, First out.
- In stacks, you push or pop at the top.
- In queues.. well, it doesn’t rhyme. You enqueue at the rear and dequeue at the front.
- In both case, you can take a peek or check isEmpty… and if you’re at the bottom of a stack or the rear of a queue, your next is Null.
Things I want to know more about
n/a for this assignment