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
Any smart people want to help me
Alexus [3.1K]

Answer:

$217.50

Step-by-step explanation:

$135 + (11*$7.50) = $217.50

3 0
3 years ago
Read 2 more answers
A landowner has some land on which he wants to plant trees. He can plant 1,357 trees on landl if he already has 1,289 trees. How
babymother [125]
The answer would be 28
3 0
3 years ago
Read 2 more answers
raul invests $1000 in a savings account that earns 5% interest compounded annually. how much money will he have in the account a
12345 [234]
Amount in the bank account = 1000(1 + 0.05)^5 = $1,276.28
3 0
3 years ago
Read 2 more answers
How is the graph of y=2x^2+3 different from the graph of y=x^2-9x+20 shown below?
Pepsi [2]

Answer:

○ The graph of y = -2x² + 3 opens downward and is shifted up.

Step-by-step explanation:

According to the Quadratic Equation, <em>y = Ax² + Bx + C</em>, <em>C</em><em> </em>acts<em> </em>like a y-intercept, and in this case, since both graphs shift up [because both are positive values], we do not pay attention to those. Now, we come over to our <em>A</em>, which makes a BIG difference because both graphs open in opposite directions [one negative, one positive]. With this being stated, we have our answer.

If you are ever in need of assistance, do not hesitate to let me know by subscribing to my You-Tube channel [USERNAME: MATHEMATICS WIZARD], and as always, I am joyous to assist anyone at any time.

** Extended information on Parabolas

Opens down → -A

Opens up → A

5 0
3 years ago
WILL GIVE BRAINLIEST PLEASE ANSWER
Anestetic [448]

Answer:B is correct one

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Graph f(x)= -(x-2)²+4<img src="https://tex.z-dn.net/?f=" id="TexFormula1" title="" alt="" align="absmiddle" class="latex-formula
    15·1 answer
  • X - 3/7 = 4 what is x in simplest form
    6·1 answer
  • Write as a complex number in standard form
    8·1 answer
  • Please help Will mark brainliest Algebra
    13·1 answer
  • Solve the following, and express your answer in scientific notation.
    13·1 answer
  • What is the greatest common factor of 30 and 15
    5·1 answer
  • The speed of a car as a function of time is shown in the figure(attached up) . Find the distance travelled by the car in 8 secon
    9·2 answers
  • PLS HELP!! In a class of 30 students, the height of all students was measured and assembled in the table below. Find the value o
    11·1 answer
  • Mohamed packs food in a cooler for a camping trip. He makes
    5·1 answer
  • Please help me with this math problem!! NO LINKS PLEASE!! :)
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!