P.BHARGAV SAI

STACKS & QUEUES

STACKS :

A stack actually means a pile of objects, typically one that is neatly arranged.  It actually means of arranging things one by one(from top to bottom) having only one way for input & output . Think about arranging things in linear order" one on another" with top open , obviously we need to insert each element one after the other in a systematic matter. 

As bottom of box is completely closed so the “last added element will be the first removed element”, similarly "first added element is removed at last" stack involves of this operations

Before we ad

Join Media.com for Exclusive Access

Enjoy and share content from a verified online community. Create your FREE Media.com profile today!

By P.BHARGAV SAI