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
Write an algorithm to add an element at the end of circular linked list.   Algorithm to Add the Element at the End of Circular Linked List. IINSENDCLL( INFO, LINK, START, A

Q. Write down an algorithm to merge the two sorted arrays into the third array. Do  not perform the sort function in the third array.                           Ans: void m

Q. Define the graph, adjacency matrix, adjacency list, hash function, adjacency matrix, sparse matrix, reachability matrix.

give some examples of least cost branch and bound method..

Q. What do you understand by the term Binary Tree? What is the maximum number of nodes which are possible in a Binary Tree of depth d. Explain the terms given below with respect to

explain quick sort algorithm

Q. Explain what do we understand by Binary Search Tree (BST)? Make a BST for the following given sequence of the numbers. 45, 32, 90, 21, 78, 65, 87, 132, 90, 96, 41, 74, 92

Q.1 What is an algorithm? What are the characteristics of a good algorithm? Q.2 How do you find the complexity of an algorithm? What is the relation between the time and space c

A circular queue can be implemented through arrays or linked lists. Program 6 gives the array implementation of any circular queue. Program 6: Array implementation of any Circu

Determine in brief about the Boolean Carrier set of the Boolean ADT is the set {true, false}. Operations on these values are negation, conjunction, disjunction, conditional,