Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 696 Bytes

File metadata and controls

13 lines (10 loc) · 696 Bytes

Stack and Queue

What is it

Create Stack, Queue, and Node classes to implement these data structures, including all needed methods for data manipulation. A stack adds and removes nodes to the top of the list and allows you to also view that top node. A queue adds nodes to a list like a chain and removes the oldest node first (the first added node).

Visual

Use Examples

A stack would be best used for when handling a lot of data that we only want to handle one thing at a time, as we only care about the top node. A queue would be used for data that needs to be handled in an orderly fashion, as things are exectued in the order that they were added.