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
6. Christopher wants to leave a 15% tip for his breakfast. His breakfast cost $23.00, how
Anestetic [448]

Answer:

$3.45

Step-by-step explanation:

The tip is 15% of his breakfast, that means 15% of 23

That is 15%* 23= 15*23/100= 3.45 $

The tip is $3.45

Have a good day.

7 0
3 years ago
Find (−3d2+10d−8)−(7d2−d−6). The difference is .
katovenus [111]

-10d^2 + 11d - 2

To find this, distribute the - to 7d^2 - d - 6.

This will give you a new equation of:

-3d^2 + 10d - 8 -7d^2 + d + 6

Combine like terms to get the answer above.

Hope this helps!

3 0
3 years ago
Arabella's password consists of 1 letter followed by two digits. What is the probability of correctly guessing Arabella's passwo
Alchen [17]
The answer is 1/2600

Hope this helps
6 0
3 years ago
Help ASAP! Plz <br> Question: Find FH
Dmitry [639]

Step-by-step explanation:

(20). FH= 22-15 = 7

(21). FH = 42 - 22 = 20

(22). FH = 53 - 40 = 13

8 0
2 years ago
Solve the equation -3(y-5)=24
ioda
-3(y-5) = 24...distribute through the parenthesis
-3y + 15 = 24....subtract 15 from both sides
-3y = 24 - 15
-3y = 9...divide both sides by -3
y = 9/-3
y = -3
3 0
3 years ago
Other questions:
  • Φ is a subset of {1, 2, 3, 4, 5, 6}<br><br> True or False
    12·1 answer
  • Each leg of a 45 45 90 triangle measures 12cm what is the length of the hypotenuse
    12·2 answers
  • Write the sentence as an equation.<br> 41 added to n equals 388
    14·2 answers
  • I need a answer to 77.5% of 13.270​
    10·1 answer
  • Simplify (write without absolute value sign): |x+3|, if x&gt;2
    11·1 answer
  • Mercury travels about 107,100 miles per hour as it resolves around the sun. How far does Mercury travel in 6 seconds?
    15·2 answers
  • James was putting the table cloth back on the table after dinner. The table is 25 inches long and 10 inches wide. If the table c
    12·2 answers
  • If triangle ACB is congruent to triangle DCE, angle CAB=50 degrees, angle DCE= 45 degrees, and angle CDE =10x what does x equal
    6·1 answer
  • Mr. Andade had supply bag with three mechanical pencils, four blue pens, and five black pens. If he selects a writing utensil wi
    12·1 answer
  • Help will give thanks to the first to answer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!