Data Structure
Stacks and queues are two types of linear data structure that can be easily found in real life. In this project, I am showing both models in one dynamic and graphic representation.
Features
- Stack
- Each time an element is added, it is placed on top of the previous one.
- The last element that entered is the one that comes out.
- This is known as LIFO (Last In, First Out).
- We can compare the concept with a pile of books or dishes.
- Queue
- Elements are placed in order of arrival.
- The first element that has been placed, is the one that comes out.
- This is known as FIFO (First In, First Out).
- We can compare the concept with a supermarket queue.
What I learned
- How to practice object-oriented programming with the Constructor Pattern.
- How to understand the theory and logic behind the FIFO and the LIFO.
Technologies
- Front-end: JavaScript (ES6), HTML, CSS
- Back-end: -