LED PANEL

Google It, You'll Get It.

Monday, March 28, 2011

Stacks - Introduction

-Stack is the First Data Structure in Programming.

-It is a method where we use LIFO ( LAST IN - FIRST OUT ).

LIFO stacks, also known as "push down" stacks, are the conceptually simplest way of saving information in a temporary storage location for such common computer operations as mathematical expression evaluation and recursive subroutine calling.

-It has only two fundamental operations called PUSH and POP.

--PUSH > to insert an element ( to the top )
The push operation adds an item to the top of the stack,
hiding any items already on the stack, or initializing the stack if it is empty.

--POP > to remove an element ( from the top )
The pop operation removes an item from the top of the stack, and returns this value to the caller. A pop either reveals previously concealed items, or results in an empty stack.

No comments:

Post a Comment