Data Structures : Stack

Stack is the data structure that can be logically through as Linear Data Structure. The basic implementation is called as LIFO ( Last In First Out ) way.




 

There are three operation can be perform in a stack data structure. 

  1. Push ( Insertion of an element )
  2. Pop ( Deletion and return of top element )
  3. Peek (Return of top element, just pick and see what it is.)

Before going to the implementation lets look a Demo by Y. Daniel Liang.

http://www.cs.armstrong.edu/liang/animation/web/Stack.html
 

https://gist.github.com/nifrasismail/055b41cdd2ba4782a2c1.js

Leave a comment