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
What is the surface area of the regular pyramid? What is the surface area of a square pyramid with a height of 10.4 m and a base
Zigmanuir [339]

Answer:

A. 141.4 cm

Step-by-step explanation:

The piramide is 141.4cm

6 0
3 years ago
In the school library, 28% of the books are non-fiction. If there are 1,224 fiction books in the library, what is the total numb
N76 [4]

Answer:

<em>There are 1700 books in the library.</em>

Step-by-step explanation:

<em>If 28% of the books is non-fiction, that means the remaining 72% of books are fiction.</em>

If 72% of the books are fiction, 1224/72 will give us 1%, which is 17.

If 1% is 17 books, then 17*100=100% of books.

There are 1700 books in the library.

8 0
3 years ago
A survey of favorite movie types found that 36% of people polled preferred comedies instead of action movies. if
Wittaler [7]

Answer:

Step-by-step explanation:

a)

The answer is greater than 450 because the percentage is less than 100%

b)

36% = 36/100 = 0.36

450/0.36 = 1250

how many people were surveyed?:

1250

7 0
2 years ago
A rectangular playground has an area of 768 square meters. If the width of the rectangle is 32 meters, find the length.
Lapatulllka [165]
The length is 24 because 768 is the are and to find area you would do length x width but in this case the width has already been told so you have:
32 X____=768
so you do 768÷32= 24 so that's your answer sorry for such a long explanation which probably wasn't necessary but oh well!
4 0
3 years ago
Question
dezoksy [38]

Answer:

the height of the triangle is 47 inches

4 0
3 years ago
Other questions:
  • What is the equation of a line that passes through the point (0, 8) and is parallel to a line with a slope of ?
    8·1 answer
  • Help please...whats an explicit equation?
    12·1 answer
  • Maura bought a snow shovel for $40. She charges $15 for each driveway she shovels. The equation p = 15d – 40 gives her the total
    14·1 answer
  • If p=8, evaluate 4^2 / px3
    14·1 answer
  • - kobby is 5 years younger than Nana
    6·2 answers
  • What is 6 divided by 3/8?
    8·2 answers
  • Someone help me please! i will reward brainliest! this is geometry​
    5·1 answer
  • I need an expression that includes 3 operations and equals a negative number.Show all work
    5·2 answers
  • Solve for x: x-10= -12
    10·1 answer
  • 50 PTS!!A right triangle has a leg measuring 16in. And 28in.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!