Define stack lifo, Data Structure & Algorithms

 

A stack is a last in, first out (LIFO) abstract data type and sequential data structure. A stack may have any abstract data type as a component, but is characterized by two fundamental functions, called pop and push. The push operation includes a new item to the top of the stack, or starts the stack if it is empty. If the stack is full and does not have enough space to locate the given item, the stack is then goes to be in an overflow state. The pop operation replaces an item from the top of the stack. A pop either converts previously concealed results, or items in an empty stack, but if the stack is empty then it bond into underflow state. A stack pointer is the register which acquires the value of the stack. The stack pointer usually points to the top value of the stack.

 

A stack is a limited data structure, because only small values of operations are performed on it. The nature of the push and pop operations also seems that stack elements have a sequential order. Components are removed from the stack in the reverse order to the specific order of their addition: therefore, the lower components are those that have been on the stack the longest.

 

 

1988_Stack LIFO.png

Posted Date: 7/27/2012 6:52:49 AM | Location : United States







Related Discussions:- Define stack lifo, Assignment Help, Ask Question on Define stack lifo, Get Answer, Expert's Help, Define stack lifo Discussions

Write discussion on Define stack lifo
Your posts are moderated
Related Questions
Write an algorithm in form of a flowchart that takes temperatures input over a 100 day period (once per day) and outputs the number of days when temperature was below 20C and numbe

Tree is a widely used data structure employed for representing several problems. We studied tree like a special case of acyclic graph. Though, rooted trees are most prominent of al

Your objective is to write a generic doubly linked list class called CS228LinkedList that implements the List interface and uses a type variable T. All methods except for subList a

Binary tree creation struct NODE { struct NODE *left; int value; struct NODE *right; }; create_tree( struct NODE *curr, struct NODE *new ) { if(new->val

B i n a ry Search Algorithm is given as follows 1. if (low > high) 2.     return (-1) 3. mid = (low +high)/2; 4. if ( X = = a [mid]) 5.      return (mid); 6.

Write down any four applications of the queues.                                                            Ans. A pp li cation of Queue is given below (i)  Queue is

This notation bounds a function to in constant factors. We say f(n) = Θ(g(n)) if there presents positive constants n 0 , c 1 and c 2 such that to the right of n 0 the value of f

In a doubly linked list, also called as 2 way list, each node is divided into 3 parts. The first part is called previous pointer field. It contains the address of the preceding

Five popular hashing functions are as follows: 1) Division Method 2) Midsquare Method 3) Folding Method 4) Multiplicative method 5) Digit Analysis

The complexity of multiplying two matrices of order m*n and n*p is    mnp