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
amm1812
3 years ago
15

Suppose you have this array of five integers: int[] list {2, 5, 4, 8, 3}. if a bubble sort is being used, which index of the arr

ay will the number 8 be in after the first pass through the algorithm?
Mathematics
1 answer:
Gwar [14]3 years ago
8 0
Array list: ⇒ <span>2, 5, 4, 8, 3

</span>Sort the array from lowest number to greatest number using bubble sort.

First pass:
2 , 5 , 4 , 8 , 3 
2 , 4 , 5 , 8 , 3 ⇒⇒⇒ Swap since 5 > 4
2 , 4 , 5 , 8 , 3
2 , 4 , 5 , 3 , 8 ⇒⇒⇒ Swap since 8 > 3

∴ The index of the number 8 <span>after the first pass = 5</span>




You might be interested in
Shannon wants to find out about paying taxes this year. She visits www.mikestaxadvice.com. This information is -
Anna007 [38]

Unrealiable

If she wants to know how to pay taxes she should visit the governments webiste. This is a third party website and could give her unreliable infortmation, she should be checking with the governments website.

7 0
3 years ago
Read 2 more answers
Can anybody help me please? i dont get it :(
sweet [91]

Answer:

ay bro dont ask me

the answer above me is already correct

good luck broski

im jus here for the points

ily<3

Step-by-step explanation:

7 0
2 years ago
Ello ... Random Question
BARSIC [14]
Hi i know the answrrrrr
7 0
3 years ago
Read 2 more answers
What is the value of x using the two transversal proportionality corollary? 9cm 11cm 22cm 27cm
almond37 [142]
I just took the test the answer is 9 cm.
4 0
3 years ago
If a snowball melts so that its surface area decreases at a rate of 3 cm2/min, find the rate (in cm/min) at which the diameter d
grin007 [14]

Answer:

The diameter decreases at a rate of 0.053 cm/min.

Step-by-step explanation:

Surface area of an snowball

The surface area of an snowball has the following equation:

S_{a} = \pi d^2

In which d is the diameter.

Implicit differentiation:

To solve this question, we differentiate the equation for the surface area implictly, in function of t. So

\frac{dS_{a}}{dt} = 2d\pi\frac{dd}{dt}

Surface area decreases at a rate of 3 cm2/min

This means that \frac{dS_{a}}{dt} = -3

Tind the rate (in cm/min) at which the diameter decreases when the diameter is 9 cm.

This is \frac{dd}{dt} when d = 9. So

\frac{dS_{a}}{dt} = 2d\pi\frac{dd}{dt}

-3 = 2*9\pi\frac{dd}{dt}

\frac{dd}{dt} = -\frac{3}{18\pi}

\frac{dd}{dt} = -0.053

The diameter decreases at a rate of 0.053 cm/min.

7 0
3 years ago
Other questions:
  • Which equation represents a true sine ratio in triangle ABC
    10·1 answer
  • What word phrase can you use to represent the algebraic expression 3m
    13·2 answers
  • Solve to find the value of x.
    7·1 answer
  • A local theater can seat 2,254 people. the seats arranged into 98 rows. Each row has the same number of seats. How many seats ar
    11·1 answer
  • What is the arc length of an angle of 7pi/6 radians formed on the unit circle?
    6·1 answer
  • 17. Determine which point lies in the solution of the system: y&lt; -1x+2, y ≥ 3x - 4
    13·2 answers
  • Determine if the expression – 6y 25 – is a polynomial or not. If it is a
    8·1 answer
  • The perimter of a rectangle is 34 units. Its width is 6.5 units. Write an equation to determine the length (l) if the rectangle
    14·1 answer
  • Expand.<br> Your answer should be a polynomial in standard form.<br> (7g+2)(5g+4)=
    14·1 answer
  • Two angles are supplementary. If one measures 125°, what is the measure of the other<br> angle?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!