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 for the gpa of six students

Prove that uniform cost search and breadth- first search with constant steps are optimal when used with the Graph-Search algorithm (see Figure). Show a state space with varying ste

Compare zero-address, one-address, two-address, and three-address machines by writing programs to compute: Y = (A – B X C) / (D + E X F) for each of the four machines. The inst

In this assignment, you are invited to design and implement a software system for catalogue sale. A catalogue is organised in a tree structure. Each node of the catalogue tree repr

#include #include int sumFact(int numb); int calculateFactorial(int digit); main() { int numb, sumfact; do{ printf ("Enter a number 1 to 9999\n"); scanf("%

Ask question #Minimum 1Mark each of the following statements as valid or invalid. If a statement is invalid, explain why. a. current ¼ list; b. temp->link->link ¼ NULL; c. trail->l

Polynomials like  5x 4    +  2x 3    +  7x 2     +  10x  -  8  can  be  represented by using arrays. Arithmetic operations such as addition & multiplication of polynomials are com

What is an Algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for getting a needed output for any legitimate input in a finite amoun

Sequential files are most frequently utilized in commercial batch oriented data processing where there is the concept of a master file on which details are inserted periodically. F

Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge