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 assembly program to separate the number of positive numbers and negative numbers from a given series of signed numbers.

ALGORITHM (Insertion of element into a linked list) Step 1 Begin the program Step 2 if the list is empty or any new element comes before the start (head) element, then add t

Illustrates the program segment for Quick sort. It uses recursion. Program 1: Quick Sort Quicksort(A,m,n) int A[ ],m,n { int i, j, k; if m { i=m; j=n+1; k

Row Major Representation In memory the primary method of representing two-dimensional array is the row major representation. Under this representation, the primary row of the a

Define null values.  In some cases a particular entity might not have an applicable value for an attribute or if we do not know the value of an attribute for a particular entit

Abstract data type The thing which makes an abstract data type abstract is that its carrier set and its operations are mathematical entities, like geometric objects or numbers;

The class Element represents a single node that can be part of multiple elements on a hotplate and runs in its own thread. The constructor accepts the initial temperature and a hea

Design  and implement  an algorithm  to simulate car  re-organizing of the train at the railway switching junction. You can only use stacks as the data structure to represent the t

infix to revrse polish

DEPTH FIRST SEARCH (DFS) The approach adopted into depth first search is to search deeper whenever possible. This algorithm frequently searches deeper through visiting unvisite