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 local gym had 490 members last quarter. This quarter, with a change in its rates, it has 686 members. What is the percent of i
sergij07 [2.7K]

Given:

Number of gym members in last quarter = 490

Number of gym members in this quarter = 686

To find:

The percent of increase in the number of members.

Solution:

We have,

Number of gym members in last quarter = 490

Number of gym members in this quarter = 686

Now, the percent of increase in the number of members.

\%\text{ of increase}=\dfrac{{Members in this month - Members in last month}}{\text{Members in last month}}\times 100

\%\text{ of increase}=\dfrac{686-490}{490}\times 100

\%\text{ of increase}=\dfrac{196}{490}\times 100

\%\text{ of increase}=\dfrac{2}{5}\times 100

\%\text{ of increase}=2\times 20

\%\text{ of increase}=40

Therefore, the gym members increased by 40%.

4 0
3 years ago
A fish is 3 feet below the surface of a lake. If its position can be recorded as −3 feet, what would the position of 0 represent
trasher [3.6K]

Answer:

On the surface of the lake

Step-by-step explanation:

A position of 0 represent that the object is on the surface of the lake. Negative 3 represents 3 feet below the surface of the lake.

Hope this helps.

Please mark me brainliest

8 0
3 years ago
If the lengths of two sides of a triangle are 3 and 12, which could be the length of the third side?
Ierofanga [76]

Answer: 1st is if it’s 2 legs second is if it’s a leg and hypotenuse

Step-by-step explanation:

6 0
3 years ago
Help me out please!
Marina86 [1]

Answer: Depends on what you come up with . /:

Step-by-step explanation:

3x-11+x+9= if u no the form for this... -x with 3x and -9 -11 should to a division problem so u divide from both sides leaving x = your sum.

4 0
3 years ago
Please help me! i’m really confused on this because i keep getting -5 outside the thing
Leona [35]

Answer: D.

Step-by-step explanation: First you find the common factor, which is 5x³y. Then you write in parenthesis what's left over from each term. So  the answer should look like: 5x³y(-3x⁵-4z+9).

4 0
1 year ago
Other questions:
  • A youth Basketball has a standard Circumference of 27 inches. An NBA standard ball is 29.5 inches.
    10·1 answer
  • I REALLY NEED HELP!! WILL MARK BRAINLIEST!
    5·2 answers
  • What is the solution to the problem -64&lt;8+4(x-3)
    15·1 answer
  • 6m+7n+5m-3n how do I solve
    6·2 answers
  • Evaluate the following absolute value expressions. 5|2-8|
    10·1 answer
  • 4. What is the range of the relation below?<br> A. -1 C.-1 Sy&lt;4<br> D.-35ys2<br> B.-3Sxs2
    8·2 answers
  • Which postulate can be used to prove the two triangles are congruent?
    10·1 answer
  • Determine the value of the variable that makes the equation true 1 /3​a=−5
    11·1 answer
  • Please help:).......
    9·1 answer
  • Solve for y.<br><br> y = 93 degrees<br> y = 103 degrees<br> y = 23 degrees<br> y = 33 degrees
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!