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
Speed cameras read the time a vehicle passes a point (A) on road and then reads time it passes a second point (B) on the same road (points A and B are 100 metres apart). Speed of t

Krushkal's algorithm uses the concept of forest of trees. At first the forest contains n single node trees (and no edges). At each of the step, we add on one (the cheapest one) edg

Thus far, we have been considering sorting depend on single keys. However, in real life applications, we may desire to sort the data on several keys. The simplest instance is that

The maximum degree of any vertex in a simple graph with n vertices is (n-1) is the maximum degree of the vertex in a simple graph.

difference between recursion and iteration

Open addressing The easiest way to resolve a collision is to start with the hash address and do a sequential search by the table for an empty location.

1. Apply the variant Breadth-First Search algorithm as shown in Figure 2 to the attached graph. This variant is used for computing the shortest distance to each vertex from the sta

write a c++ program to find out the area of a curve y=f(x) between x=a and x=b

Write a recursive function the computes the number of digits in a positive integer n. For example if n = 6598, the function should return 4. Find a variant expression and a thresho

Linked list representations contain great advantages of flexibility on the contiguous representation of data structures. However, they contain few disadvantages also. Data structur