Size of stack, Data Structure & Algorithms

Assignment Help:

The size of stack was declared as ten. Thus, stack cannot hold more than ten elements. The major operations which can be performed onto a stack are push and pop. However, in a program, we have to provide two more options, namely, show elements & exit. Show elements will display the elements of the stack. In particular case, the user is not interested to carry out any operation onto the stack and would like to get out of the program, and then s/he will choose exit option. It will log the user out of the program. Choice is a variable that will enable the user to choose the option from the push, pop, show elements & exit operations. top points towards the index of the free location in the stack to where the next element can be pushed. Element is the variable that accepts the integer that need to be pushed onto the stack or will hold the top element of the stack which has to be popped from the stack. The array stack can hold at most ten elements. Push & pop will carry out the operations of pushing the element to the stack & popping the element from the stack respectively.


Related Discussions:- Size of stack

Types of a linked list, A linked list can be of the following types:- ...

A linked list can be of the following types:-  Linear linked list or one way list Doubly linked list or two way list. Circular linked list Header linked list

Graphs, In this unit, we will describe a data structure called Graph. Actua...

In this unit, we will describe a data structure called Graph. Actually, graph is a general tree along no parent-child relationship. In computer science, Graphs have several applica

Program, circular queue using c

circular queue using c

Data mining assignment, The assignment aims at consolidating your knowledge...

The assignment aims at consolidating your knowledge on data mining techniques and developing practical skills through solving a problem of transcription factor binding sites recogn

Algorithm to find maximum and minimum numbers, Give an algorithm to find bo...

Give an algorithm to find both the maximum and minimum of 380 distinct numbers that uses at most 568 comparisons.

Average case anaysis, what is the impoartance of average case analysis of ...

what is the impoartance of average case analysis of algorithm

Registers, what are registers? why we need register? Definition? Types? Wha...

what are registers? why we need register? Definition? Types? What registers can do for us?

Linked list, Write a program for reversing the Linked list

Write a program for reversing the Linked list

Pipeling, Asktypes of pipelining question #Minimum 100 words accepted#

Asktypes of pipelining question #Minimum 100 words accepted#

Tree Traversal, If preorder traversal and post order traversal is given the...

If preorder traversal and post order traversal is given then how to calculate the pre order traversal. Please illustrate step by step process

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd