Stack Data Structure

I have just published a program that shows examples of a stack data structure.

Stacks are an elementary Data Structure where all interaction with the data is done through the looking at the first element.

There are two main operations on Stacks, Push and Pop.

The push operation is used to insert an item into the stack. The name push comes from the fact that when an item is inserted into the stack it is put into the first element in the stack, so we think of it as lying on top of the stack.

Likewise, the pop operation is used to remove an item from the stack. Items are removed from the top of the stack first.

Similar Posts:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.