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 this just tell me what the L AND W ='s please
andreyandreev [35.5K]
You didn't show us much of the page with the question on it,
so we can't be sure of exactly what you're working on in math.

If you're working with things like squares and rectangles, then
'L' and 'W' are often used to represent the Length and Width of
shapes drawn on paper, or even Length and Width of 3D objects
like blocks or boxes. 
7 0
3 years ago
Read 2 more answers
My question is in the picture please help. First answer gets brainliest​
Mandarinka [93]
Round 1 player 1 because 12 is the greatest number
5 0
3 years ago
a square garden has a diagonal of 12 m. What is the perimeter of the garden? Express in simplest radical form
lianna [129]

Answer:

The perimeter of the garden, in meters, is 24\sqrt{2}

Step-by-step explanation:

Diagonal of a square:

The diagonal of a square is found applying the Pythagorean Theorem.

The diagonal of the square is the hypothenuse, while we have two sides.

Diagonal of 12m:

This means that d = 12, side s. So

s^2 + s^2 = 12^2

2s^2 = 144

s^2 = \frac{144}{2}

s^2 = 72

s = \sqrt{72}

Factoring 72:

Factoring 72 into prime factors, we have that:

72|2

36|2

18|2

9|3

3|3

1

So

72 = 2^{3}*3^{2}

So, in simplest radical form:

s = \sqrt{72} = \sqrt{2^{3}*3^{2}} = \sqrt{2^3}*\sqrt{3^2} = 2\sqrt{2}*3 = 6\sqrt{2}

Perimeter of the garden:

The perimeter of a square with side of s units is given by:

P = 4s

In this question, since s = 6\sqrt{2}

P = 4s = 4*6\sqrt{2} = 24\sqrt{2}

The perimeter of the garden, in meters, is 24\sqrt{2}

5 0
3 years ago
Please help quick i will give brainlist!!!!!!
ipn [44]

Answer:

a) 75/3=25/1

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
The numbers 1, 2, 3, 4, 5, 6 are written on identical cards and placed in a bag. A card is selected at
AleksandrR [38]

Answer:

yes yes yes yes yes yes yes

8 0
3 years ago
Other questions:
  • What is x-3y=-6 in slope intercept form
    7·2 answers
  • Write 7200kg in grams, give your answer in standard form
    13·1 answer
  • Which of the follwing equations has a quotient with a remainder? Select the three that apply. A. 946/32 B. 1157/11 C.3524/44 D.3
    5·1 answer
  • The formula for interest is I=Prt. Describe what these letters stand for. Is the formula the same if you are charged interest on
    5·1 answer
  • Which associations best describe the scatter plot?
    15·2 answers
  • PLEASE HELP ASAP!!!!!!!!!!!!!!!!!!!!
    7·2 answers
  • Find all complex numbers z such that z^2=2i<br><br>please answer in a+bi<br><br>thank you​
    14·1 answer
  • Zalma’s stock investment in March was $120. In October, it was $400.
    5·2 answers
  • Find the area of the shaded region. Round to the nearest tenth.
    15·1 answer
  • And fast plzz<br>will .ark the brainliest <br>​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!