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
In the year, , the American Department of Defense put a military research network, called ARPANET online.
mario62 [17]

Answer:

November 21st of 1969.

Explanation:

In the year, 1969, the American Department of Defense put a military research network, called ARPANET online.

3 0
2 years ago
What is the main purpose of cutting plane line arrows?
Vedmedyk [2.9K]

The answer is (A)

The arrows themselves on the end of the line are used to indicate the direction of the sight for the section view and from which direction it is viewed in. These lines look like 2 perpendicular lines with arrows and are drawn at the end of the line.

 

 






5 0
3 years ago
In design and implementation of any _____ reasoning application, there are 4 Rs involved: retrieve, reuse, revise, and retain.
Burka [1]

Answer:

case-based.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

Simply stated, it's a computer program or application that comprises of sets of code for performing specific tasks on the system.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are;

1. Planning.

2. Analysis.

3. Design.

4. Development (coding).

5. Testing.

6. Implementation and execution.

7. Maintenance.

A case-based reasoning application refers to a knowledge-based system that is designed and developed to use previous case scenarios (similar past problems) to interprete or proffer a solution to a problem.

In design and implementation of any case-based reasoning application, there are four (4) Rs involved: retrieve, reuse, revise, and retain.

5 0
3 years ago
Which type of network involves buildings in multiple cities connecting to each other?
NeX [460]

Answer:

Power lines

Explanation:

Because their everywhere

4 0
3 years ago
What is the difference between a switch and a hub?
marta [7]

Explanation:

A hub is used to send the message from one port to other ports.It does not know the specific address of the destination where the message needs to send.it works on Physical layer of the OSI model(layer 1).

A switch can handle data and it knows the specific address of the destination.A switch works on the data link Layer of the OSI model(layer 2).

8 0
3 years ago
Other questions:
  • To clean dirt and spilled electrolyte from a battery, use a dilute solution of either water and baking soda or water and A. sulf
    13·1 answer
  • All of the following are search operators EXCEPT _______________. a. AND b. OR c. NOT d. GET
    12·2 answers
  • 2. Integer plot function (find a smart way to code big integers) Write a program BigInt(n) that displays an arbitrary positive i
    8·1 answer
  • Which cable standard is a standard for newer digital cable, satellite, and cable modem connections?
    11·1 answer
  • Choose all that apply.
    5·2 answers
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
  • Join each of the follwing sentences using unless
    14·2 answers
  • Which panel is used to make a website​
    8·1 answer
  • What is software? Why is it needed?​
    6·1 answer
  • Task 2
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!