Implementation of stack using arrays, Data Structure & Algorithms

A Stack has an ordered list of elements & an array is also utilized to store ordered list of elements. Therefore, it would be very simple to manage a stack by using an array. Though, the problem along with an array is that we are needed to declare the size of the array before using it in a program. Thus, the size of stack would be fixed. However, an array & a stack are completely different data structures, an array may be utilized to store the elements of a stack. We may declare the array along a maximum size large sufficient to manage a stack. Program1 implements a stack by using an array.

Posted Date: 4/10/2013 1:03:42 AM | Location : United States







Related Discussions:- Implementation of stack using arrays, Assignment Help, Ask Question on Implementation of stack using arrays, Get Answer, Expert's Help, Implementation of stack using arrays Discussions

Write discussion on Implementation of stack using arrays
Your posts are moderated
Related Questions
Q. Give the adjacency matrix for the graph drawn below:                                                 Ans: Adjacency matrix for the graph given to us

A striking application of DFS is determine a strongly connected component of a graph. Definition: For graph G = (V, E) , where V refer to the set of vertices and E refer to the

data structure for multiqueue

how to write a pseudo code using Kramer''s rule

The most common way to insert nodes to a general tree is to first discover the desired parent of the node you desire to insert, and then insert the node to the parent's child list.

differentiate between indexing and hashing in file organization

Draw trace table and determine output from the subsequent flowchart using below data:  X = 5, -3, 0, -3, 7, 0, 6, -11, -7, 12

WHAT IS THE PURPOSE OF STACK IN C

The following formula is used to calculate n: n = x * x/(1 - x) . Value x = 0 is used to stop algorithm. Calculation is repeated using values of x until value x = 0 is input. There