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 method a. may have zero or more parameters b. never has parameter variables c. must have at least two parameter variables d. m
Lynna [10]

Answer:

The answer is "Option a"

Explanation:

A method is a technique, that associated with both a message and an object. It includes information, behavior, and actions of an interface defining, how the object can be used, and wrong choices can be described as follows:

  • In option b, It includes parameters in the method.
  • In option c, It contains a parameter, that may be one or more.
  • In option d, It contains one parameter also.

5 0
3 years ago
Write a program that computes and displays a 15 percent tip when the
Anuta_ua [19.1K]
Your question wasn't very clear, but I think I understand what you want. Additionally, you should really state what language you're working with. Here it is in C#, and shouldn't be too much of a hassle to translate in to other languages.


Console.Write("Enter payment: ");

float payment;

if (float.TryParse(Console.ReadLine(), out payment))
    Console.WriteLine((Math.Floor(payment * 100) / 100) * 0.15, + " at 15% tip.");
else
    Console.WriteLine("Invalid input.");
5 0
3 years ago
Shannon has been a member of her schools newpaper club for 2 years and attends writing workshops in her free time. Which career
kkurt [141]

D) Web content developer

Explanation:

A content developer writes a well-researched content for websites, publications, and television. They also write sales copy and other marketing material for online and offline marketing. They develop text, graphics, audios, and videos.  

Skills that help web content developer:

  1. Reading news every day  
  2. Write regularly
  3. Study end audience
  4. Develop original and unique content
  5. Research; reading other people's content as well
  6. Provide solutions through your content

Besides these, a web content writer must possess technical skills like front-end web development. They must know basic HTML formatting and search engine optimization.  

7 0
3 years ago
The commands available here change depending on the activity taking place in the presentation window's main work area.
pickupchik [31]

task pane is correct!

7 0
3 years ago
Read 2 more answers
Outline three difference each of a raster filled and vector file​
Alekssandra [29.7K]

Answer:

Unlike raster graphics, which are comprised of colored pixels arranged to display an image, vector graphics are made up of paths, each with a mathematical formula (vector) that tells the path how it is shaped and what color it is bordered with or filled by.

Explanation:

7 0
3 years ago
Other questions:
  • Para saan po yung points dito?
    15·1 answer
  • What does the shell of an operating system do
    14·1 answer
  • In the SQL environment, a _____________ is a logical group of database objects – such as tables and indexes – that are related t
    11·1 answer
  • Mention two hardware groups​
    7·1 answer
  • A trackerball is a pointing device
    9·1 answer
  • What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
    5·1 answer
  • The TCP _____ is the amount of information that a machine can receive during a session and still be able to process the data.
    5·1 answer
  • Which of the following describe audio-editing software? Choose all that apply.
    5·2 answers
  • There are many reasons to convert to the decimal numbering system. Select the best answer. When checking numeric values in compu
    5·2 answers
  • An electronics company develops a line of augmented reality headsets for use in interactive 3d media applications using 5g mmwav
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!