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. Take an array A[20, 10] of your own. Suppose 4 words per memory cell and the base address of array A is 100. Find the address of A[11, 5] supposed row major storage.

Determine in brief the Painter Algorithm a) The farthest polygon, namely the rectangle PQRS, is stored first. (b) The next farthest, the quadrilateral ABCD, is superpo

Post order traversal: The children of node are visited before the node itself; the root is visited last. Each node is visited after its descendents are visited. Algorithm fo


Determine the importance of array Arrays are significant since they allow many values to be stored in a single data structure whereas providing very fast access to each value.

Multiplication Method: The multiplication method operates in 2 steps. In the 1ststep the key value K is multiplied by a constant A in the range O

Q. Assume that we have separated n elements in to m sorted lists. Explain how to generate a single sorted list of all n elements in time O (n log m )?

Mid Square method with good example

Count Scorecards(30 points) In a tournament, N players play against each other exactly once. Each game results in either of the player winning. There are no ties. You have given a