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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s