Completely Solved C, C++ Programs Assignment.

Concept of Stack

Filed Under: ,

Welcome to! your source for free data structures online course,data structure final exam,computer data structures and interactive data structure visualizations,use of stack in computer science.
[stack] A stack is simply a list of elements with insertions and deletions permitted at one end—called the stack top. That means that it is possible to remove elements from a stack in reverse order from the insertion of elements into the stack. Thus, a stack data structure exhibits the LIFO (last in first out) property. Push and pop are the operations that are provided for insertion of an element into the stack and the removal of an element from the stack, respectively. Shown in Figure 1 are the effects of push and pop operations on the stack.
Figure 1: Stack operations.
Since a stack is basically a list, it can be implemented by using an array or by using a linked representation.
There are many applications requiring the use of the data structures stacks and queues. The most striking use of a data structure stack is the runtime stack that a programming language uses to implement a function call and return. Similarly, one of the important uses of a data structure queue is the process queue maintained by the scheduler. Both these data structures are modified versions of the list data structure, so they can be implemented using arrays or linked representation.
Back to main directory:  Data Structure 

Get Free Programming Tutorials and Solved assignments