Both are data structures that add data and remove it
- Stack is LIFO - dirty dishes stacked, you remove the last one added
- Abstract data collection (more than one way to build this)
- Uses:
- undo/redo functionality in most software
- manageing function invocations
- routing (browser history)
- tree and graph algorithms
- Queue is FIFO - like a line for a ride, first person in line, is first on the ride (out)
- Abstract data collection as well (more than one way to build this)
- Uses:
- videogame queues
- background tasks
- uploading resources
- printing/task processing (first document sent will be first to print)
- source
- JavaScript Algorithms and Data Structures Masterclass (udemy)