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
A carpenter is building a rectangular bookcase with diagonal braces across the back as shown the Carpender knows that angle ADC
Rudik [331]
I think I have the diagram right.
Let ADB = x, and then BDC = x+32.
x+x+32 = 90
2x = 58
x = 29 = ADB
so BDC = 61
6 0
3 years ago
The measure of angle 1 is 65 degrees. What are the measures of the other seven angles? (Enter the
Anika [276]

Answer:

See solution below

Step-by-step explanation:

According to the diagram shown

m<1 = m<5 = 5=65 degrees (corresponding angle)

m<5 = m<4 - 65 degrees (alternate interior angle)

m<9 = m<8 = 65degrees (corresponding angle)

m<5 = m<8 = 65dgrees (vertically opposite angles)

m<6+m<8 = 180

m<6 + 65 = 180

m<6 = 180 - 65

m<6 = 115degrees

m<2 = m<6 = 115degrees (corresponding angles)

m<6 = m<7 = 115degrees (vertically opposite angles)

m<3 = m<7 = 115degrees(corresponding angle)

)

3 0
3 years ago
On Thursday, 72% of the customers at a frozen yogurt shop ordered vanilla frozen yogurt. If 180 customers ordered vanilla frozen
Ber [7]
180 of 72% is 129.6. 180*72= 12960. Since 72% = .72, you need to put the decimal 2 places behind the decimal.
6 0
3 years ago
Read 2 more answers
PLEASE HELP ME ASAP!!!!!!
melamori03 [73]

Answer:

b

Step-by-step explanation:

3 0
3 years ago
Plz Help me<br><br>3x + 5y = 13 <br>2x + y = 4​
Finger [1]

Answer:

solve simultaneously

start by labeling them equation 1 and 2 then choose whether you want to make x or y the subject from knew of the equations

7 0
2 years ago
Other questions:
  • Can someone please help me with this question?
    6·1 answer
  • Hi! Does anybody know how to do this?
    11·1 answer
  • Are heart rate and age proportional or non proportional for each method
    10·1 answer
  • Plzzz helpppp333332222222222
    5·2 answers
  • Quadrilateral ABCD is inscribed in circle E. the m&lt;A=152 find m&lt;C​
    6·1 answer
  • Blueberry frozen yogurt costs $0.59 per ounce. How much would 3 ounces cost?
    7·1 answer
  • Help will mark brainliest
    8·1 answer
  • Please help me thanks please
    5·1 answer
  • Write the expression in simpliest form WILL MARK BRAINLIEST<br> 8 ( -3x + 2)
    6·2 answers
  • How would I graph this and find the solution to this system. <br> y=-1/2x+4
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!