1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elina [12.6K]
3 years ago
13

. Given an initially empty stack s that accepts integers, the following operations are performed: s.push (10) s.push (20) s.push

(30) s.push (40) s.pop () s.pop () s.push (50) s.push (60) s.push (70) s.pop () s.pop () s.push (80) s.push (90) s.pop ()
a) Write out the composition of the stack after these operations. b) What sequences of integers was popped off the stack?
Computers and Technology
1 answer:
sp2606 [1]3 years ago
4 0

Answer:

a) The composition of the stack is :- 80,50,20,10.

Where 80 is the top and 10 is the last element.

b) The sequence of the popped items 40,30,70,60,90.

Explanation:

Stack is LIFO type data structure means Last in First Out.The element inserted last will be out of the stack first.The removal and addition is only at the one end that is top.

First 10,20,30,40 will be inserted in the stack. 40 is a the top.Now two pop operations occurs. 40 and 30 will be removed from the stack.

Now 50,60,70 will be inserted in the stack then again two pop operations so 70 and 60 will be removed from the stack.

Now the stack contains 50,20,10.Top = 50.

80 and 90 are added to the stack and 1 pop operation that is 90 will be removed.

Stack is 80,50,20,10 . Top = 80.

Sequence of integers popped=40,30,70,60,90.

You might be interested in
A web application consists of one or more web pages. group of answer choices true false
algol [13]

Answer:

true

Explanation:

web application is a software or program which is accessible using any web browser.

5 0
1 year ago
Name at least TWO kinds of gaming experiences that are possible with these new control devices but were not possible on original
Pie

Yes the ansewer is c bc you can look it up!


6 0
2 years ago
A network is a group of two or more computers or devices connected together. To be able to connect, they each need a
Kay [80]
D. Internet service protocol (isp)
6 0
3 years ago
Read 2 more answers
Lets say you wanted to creat a table showing how many people in each department preferred salad, pizza, or sandwiches for lunch.
Fantom [35]

SALAD,PIZZA.SANWICHES put a mark under the one you like best

please gimme branly

6 0
3 years ago
how can electricity communication and transportation facilities indicate the potential for industrial growth
ivann1987 [24]
It can indicate the potential for industrial growth due to the fact that electricity communication helps us all on planet Earth prosper and grow as Human Beings.

Transportation facilities are always looking for ways to grow as well due to this they need to work together to create some form of technological advancements in both industies
3 0
2 years ago
Other questions:
  • In addition to not parking where signs prohibit it, you should never park __________________.
    12·1 answer
  • So for my Game Design class I have a quiz coming up...I was wondering if someone could answer some of these practice questions,
    7·2 answers
  • If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
    7·2 answers
  • Which of these planets has the coldest surface temperature?
    6·2 answers
  • _______ allows you to specify how a photo is positioned in the text of your document.
    11·1 answer
  • Interactive sites where users write about personal topic and comment to threaded discussion are called?
    10·2 answers
  • A consumer is the name for:
    6·2 answers
  • Which of the following is a valid HTML reference to a CSS file?
    13·1 answer
  • What will the "background-color" of the "topButton" be when the program is finished running?
    10·1 answer
  • Which control segment communicates with the satellites? OA master stations O B. monitoring stations O C. ground antennas D. cont
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!