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

advanatges of dynamic data structure in programming

The following DNA sequences are extracted from promoter region of genes which are co-regulated by the same transcription factor (TF). The nucleotide segments capitalized in the giv

What are the conditions under which sequential search of a list is preferred over binary search? Sequential Search is a preferred over binary search when the list is unordered

N = number of rows of the graph D[i[j] = C[i][j] For k from 1 to n Do for i = 1 to n Do for j = 1 to n D[i[j]= minimum( d ij (k-1) ,d ik (k-1) +d kj (k-1)

Elaborate the symbols of abstract data type length(a)-returns the number of characters in symbol a. capitalize(a)-returns the symbol generated from a by making its first cha

Q1. Define the following terms: (i) Abstract data type. (ii) Column major ordering for arrays. (iii)  Row major ordering for arrays. Q2. Explain the following: (i) A

Question a) Describe how the endogenous model is an improvement to the neo-classical model in explaining the long-run effect of investment on economic growth of a country.

P os t - o r d e r T r av er sal :  This can be done by both iteratively and recursively. The iterative solution would require a modification or alteration of the in-

Q .  Write down the non-recursive algorithm to traverse a tree in preorder. Ans: T he Non- Recursive algorithm for preorder traversal is written below: Initially i