Stack vs Queue from a developer point of view
Imagine with me that the Stack is an empty box and we are going
to fill it with many elements , so the first element we are going to fill
is the last element in the box when it’s full
that’s why the stack works with the first in last out (FILO) and it has
2 keywards push and pop.
Now let’s imagine that the Queue that’s a queue in a restaurant so the first
person who will come he will takes a ticket and leaves the first and that’s why
the Queue is the first in first out (FIFO) and it has also 2 keywords Enqueue
and Dequeue.




