I have faced many challenges in my life, some of them I succeeded in overcoming and some I could not. But with each challenge that I come across, I always emerge different in some way. An aspect has to change or improve to something new or even to something better. It's a great learning experience for all. At the moment I'm going through the greatest challenge of my life and I'm learning a lot with every passing day. I hope I'm going to emerge at the end as somebody I have always aspired to be.
Stack is like a pile of books placed on top of each other. We can add new books to the top and can remove them from only the top because stacks are LIFO which means last-in, first-out. Queues on the other hand are the opposite, which is FIFO meaning first-in, first-out. So adding an element to the queue will be the same but removing will happen to the first element not the last one. An example of a queue would be the wait line in front of any kind of service we see around us like the bus station or the shops,....etc.
Comments
Post a Comment