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
What type of software resides on a computer’s hard drive, and controls the CPU and all other activity between components?
myrzilka [38]
Operating System  (OS) is the answer.

An application runs in/on an OS.  It is not the OS itself. Like Word or Chrome are applications. 

Systems is too generic and not specific enough to mean anything in this context.  Throw away answer.

Network Operating System does not 'usually' run on a hard drive but on memory chips in things like routers, wireless access points and switches that move network traffic.


3 0
3 years ago
Which task can be completed with the Template Organizer?
spin [16.1K]

Answer:

B is the answer

Explanation:

i just got it right

8 0
2 years ago
Read 2 more answers
In which of the following situations is having a good credit score important?
Triss [41]
<span>The correct answer is to be able to loan from banks. Having a good credit score, impacts one's approval for bank loans. It will enable a person to have a higher chance of getting his or her loan, approved by the banks, than those who have low credit scores. </span>
8 0
3 years ago
Explain briefly why the discovery phase is a favorite with many developers
Mamont248 [21]

Answer:

Discovery phase is the beginning step of a system development work. It is an important step for our professional staff, as people will need the information gathered to make informed technical advice for the construction effort and to provide an exact cost assessment.

Explanation:

Discovery regulates our organization with the customer’s requirements at the origin. The exercises and deliverables of outline Discovery are essential to the correctness of design evaluation and preparation, and we suggest that they always are completed for complicated custom requests with unknown and unsteady technical elements.

3 0
3 years ago
How to assign some object key values to other name react const.
notsponge [240]

Props are an ordinary object of React that follow the immutable properties. This simply means that you cannot change their value throughout the component. Props and states are in the form of an object which contains the number of key value pairs that could be used to render the value of the objects

8 0
2 years ago
Other questions:
  • Why does this say I'm in middle school?
    11·1 answer
  • Which of the following correctly describes the reason for quality customer service?
    15·2 answers
  • As an improvement of the ATX form factor over AT, shorter wires made it easier to shield them and made them capable of handling
    6·1 answer
  • Which of the following would you not see on a windows 10 start menu?
    6·1 answer
  • Using Visio, create a Local Area Network (LAN) consisting of 12 computers, a switch, and three printers. The switch should be in
    11·1 answer
  • Of the various trends affecting the advertising and promotion industry, _____________ offers an opportunity for advertisers to d
    9·1 answer
  • Czy FALL GUYS będzie działało szybko na i5 GH8? Na ilu FPS?
    13·1 answer
  • Definition of digital
    9·2 answers
  • You decide to test an audio clip that you have inserted into your presentation, but before you do that you make sure that the co
    6·1 answer
  • What will be displayed after this code segment is run?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!