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
melamori03 [73]
3 years ago
13

Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the insertion sort algori

thm as discussed in the book. What is the resulting list after two passes of the sorting phase; that is, after three iterations of the for loop?a. list = {10, 18, 20, 24, 75, 70, 60, 35}b. list = {10, 20, 24, 75, 70, 18, 60, 35}c. list = {10, 18, 20, 24, 35, 70, 60, 75}d. list = {10, 20, 20, 18, 35, 70, 60, 75}
Engineering
1 answer:
Greeley [361]3 years ago
8 0

Answer:

Option B

10,20,24,75,70,18,60,35

Explanation:

The first, second and third iteration of the loop will be as follows

insertion sort iteration 1: 20,24,10,75,70,18,60,35

insertion sort iteration 2:10,20,24,75,70,18,60,35

insertion sort iteration 3: 10,20,24,75,70,18,60,35

You might be interested in
Recall the steps of the engineering design process. Compare and contrast the
Marta_Voda [28]

Answer:

hi

Explanation:

hiiiiiiiiiiiiiiiiiiiiiiiii

3 0
3 years ago
A civil engineer is studying a left-turn lane that is long enough to hold seven cars. Let X be the number of cars in the line at
BartSMP [9]

Answer:

a) C= 1/120

b) P(X>=5) = 0.333

Explanation:

The attached file contains the explanation for the answers

7 0
3 years ago
Read 2 more answers
Do all websites use the same coding to create?
Sonbull [250]

Answer:

yes.

Explanation:

because all websites use coding

6 0
3 years ago
An electric kettle is required to heat 0.64 kg of water from 15.4°C to 98.2°C in six
skelet666 [1.2K]

Answer:

Almost done

Explanation:

I am just finishing up my work

7 0
2 years ago
Create a program named PaintingDemo that instantiates an array of eight Room objects and demonstrates the Room methods. The Room
Serggg [28]

Answer:

Explanation:

Code used will be like

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace PaintingWall

{

class Room

{

public int length, width, height,Area,Gallons;

public Room(int l,int w,int h)

{

length = l;

width = w;

height = h;  

}

private int getLength()

{

return length;

}

private int getWidth()

{

return width;

}

private int getHeight()

{

return height;

}

public void WallAreaAndNumberGallons()

{

Area = getLength() * getHeight() * getWidth();

if (Area < 350)

{

Gallons = 1;

}

else if (Area > 350)

{

Gallons = 2;

}    

Console.WriteLine ("The area of the Room is " + Area);

Console.WriteLine("The number of gallons paint needed to paint the Room is " + Gallons);

}

 

}

class PaintingDemo

{

static void Main(string[] args)

{

int l, w, h;

Room[] r = new Room[8];

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room "+(i+1));

Console.Write("Enter Length : ");

l = Convert.ToInt32(Console.ReadLine() );

Console.Write("Enter Width : ");

w = Convert.ToInt32(Console.ReadLine());

Console.Write("Enter Height : ");

h= Convert.ToInt32(Console.ReadLine());

r[i] = new Room(l,w,h);

Console.WriteLine();

}

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room " + (i + 1));

r[i].WallAreaAndNumberGallons();

}

Console.ReadKey();  

}

}

}

3 0
3 years ago
Other questions:
  • A mysterious device found in a forgotten laboratory accumulates charge at a rate specified by the expression gm = 9 - 10tC from
    13·1 answer
  • Water flovs in a pipe of diameter 150 mm. The velocity of the water is measured at a certain spot which reflects the average flo
    13·1 answer
  • Danny enjoys studying transportation networks and systems. Which field of engineering should he pursue?
    11·1 answer
  • A PMOS device with VT P = −1.2 V has a drain current iD = 0.5 mA when vSG = 3 V and vSD = 5 V. Calculate the drain current when:
    12·1 answer
  • The Manufacturing sector is the only sector where Lean manufacturing philosophy can be applied. a)- True b)- False
    12·1 answer
  • Exhaust gases entering a convergent nozzle have a total pressure (Pt) of 200 kPa and total temperature (Tt) of 800 K. The gases
    5·2 answers
  • Suppose that tank holds 1% liquid water by volume and 99% vapor water by volume at a temperature of 185oC. What is the quality?
    10·1 answer
  • A heat pump with refrigerant-134a as the working fluid is used to keep a space at 25°C by absorbing heat from geothermal water t
    8·1 answer
  • A water contains 50.40 mg/L as CaCO3 of carbon dioxide, 190.00 mg/L as CaCO3 of Ca2 and 55.00 mg/L as CaCO3 of Mg2 . All of the
    5·2 answers
  • A proposed embankment fill requires 7100 ft of compacted soil. The void ratio of the compacted fill is specified as 0.5. Four bo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!