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
evablogger [386]
3 years ago
6

Appended below is the code for Selection Sort. You really do not have to understand the details of the code. If this algorithm t

akes 4 seconds to sort an array of 8 elements. How much time in seconds will the same code take to sort an array of 24 elements?
Mathematics
1 answer:
kramer3 years ago
8 0

Answer:

12 seconds.

Step-by-step explanation:

Let t represent time taken by code to sort an array of 24 elements.

We have been given that an algorithm takes 4 seconds to sort an array of 8 elements. We are asked to find the time it will take for same code to sort an array of 24 elements.

We will use proportions to solve our given problem.    

\frac{\text{Time}}{\text{Array of elements}}=\frac{4}{8}

\frac{t}{24}=\frac{4}{8}

\frac{t}{24}\cdot 24=\frac{4}{8}\cdot 24

t=\frac{4}{1}\cdot 3

t=12

Therefore, it will take 12 seconds for the same code to sort an array of 24 elements.

You might be interested in
A company can manufacture x hundred items for a total cost of C=300+1200x-100x. Find x if the total cost is 3,000
Scilla [17]
C=300+1200x-100x. Find x if the total cost is 3,000
3,000 = 300 + 1200x -100x
3000 = 300 + 1100x
2700 = 1100x
2700÷1100=x
x=27/11
x = 2 5/11 Round to 3
5 0
3 years ago
What's the answer for this?
salantis [7]
Here's a tip Subtracting a fraction is the same as multiplying it's reciprocal so for 3/4 - 3/8 you can do 3/4 x 8/3. Multiplying its reciprocal mean turn the 2nd fraction around
6 0
3 years ago
Read 2 more answers
Write an algebraic expression<br><br><br>The quotient the of 72 divided by o =
Alchen [17]

72 ÷ o should be the algebraic expression.

4 0
3 years ago
Choose the correct simplification of the expression (−21r9s3t36)0
morpeh [17]
Pretty sure when you multiply something by 0 it is 0 <span />
5 0
3 years ago
Read 2 more answers
List all the prime numbers between 7 and 35
Nataliya [291]
7,5
these two are the ones for prime numbers between  7 and 35
5 0
3 years ago
Other questions:
  • What is the value of x to the nearest tenth? a.12.0 b.4.8 c.9.2 d.7.2
    6·1 answer
  • How do you write this equation in its simplest form<br>(3d+5)+(d-2)
    15·1 answer
  • In how many ways is it possible to sit 8 people at a round table if Alex and Bob
    14·1 answer
  • What's the answer to 2(12-8x)=x-11x
    12·1 answer
  • HELP ME PLEASE! 30 points
    5·2 answers
  • Use the image to the right for this question:
    9·1 answer
  • What method can you use to find the area of the composite figure? Select three options.
    11·1 answer
  • How to solve 12x-y=37 and -5x-y=-14 using elimination method and please show work
    11·1 answer
  • Someone plz help me !!
    8·1 answer
  • Please help i just cant do this please...
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!