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
Please, i need help by tomorrow or I’m going to fail geometry. It’s for 20 points
drek231 [11]

Step-by-step explanation:

the first statement and reason is usually found in what's given at the beginning.

1.a 1. given

the last one is what they want you to prove (also found under what was given)

4. g ( the symbol just means congruent)

supplementary means if I take how far the angle opens up and add it to the other angle I will get a straight line or 180°

the middle letter tells me the corner (vertex) and like opening a book you can see how much the angle opens up. it is a definition for supplementary angles

7 0
3 years ago
What is 2x-3=15 i need help
Bingel [31]

Answer:

x = 9

Step-by-step explanation:

2x - 3 = 15

2x = 15 + 3

2x = 18 (divide both sides by 2 to get x)

2x/2 = 18/2

x = 9

3 0
3 years ago
Read 2 more answers
What is the surface area of this design?
Vesnalui [34]

Answer:

197 in

Explanation:

6.4x5=32

9x5=45

5×5=25x4=100

5×4×0.5=10×2=20

32+45+100+20=197

3 0
3 years ago
Read 2 more answers
at the library, you find 9 books on a certain topic. the librarian tells you that 55% of the books on this topic have been signe
e-lub [12.9K]
Multiply 9 books by 55% by doing

9 x .55 = 4.95

We can't have 4.95 books, though so it rounds down to 4 because you can't just add another .05.
8 0
3 years ago
Find the area of the shape shown below. Please answer.
dimulka [17.4K]

Answer:

32

Step-by-step explanation:

2x2=4/2=2  small triangle, 2x2=4 small square, 6x2/2=6 med. triangle, 6+2+2=10x4=40/2=20

2+4+6+20=32

3 0
3 years ago
Other questions:
  • Find the number of 30 sides in a polygon
    10·1 answer
  • Bodhi has a collection of 175 dimes and nickels. The collection is worth $13.30. Which equation can be used to find n, the numbe
    7·2 answers
  • What is the next prime number after 7?
    10·2 answers
  • Which is equivalent to cos^-1(.17) round your answer to the nearest hundredth of a radian
    12·1 answer
  • Really need help! anything would be appreciated
    10·2 answers
  • Pleaseeeeeeee HELPPPPPPP
    9·1 answer
  • It takes the city train5 hours to go from the first stop to the last stop. The actual traveling time is 3 hours and the train st
    15·2 answers
  • 8 out of the 32 students at a school assembly were first-grade students. What percentage of the students at the assembly were fi
    9·1 answer
  • NEED HELP ASAP !! NEED ANSWERS
    7·1 answer
  • ( P + 5 ) - 4 = 6<br><br>What is the value of P?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!