51.7k views
2 votes
Which of the following growth-rate functions would correspond to the shortest running time?

cubic

exponential

quadratic

N log N

User Galethil
by
5.3k points

1 Answer

5 votes

Answer:

The shortest running time among the given is N log N.

Step-by-step explanation:

Among the given growth rate functions the growth rate with N log N is best time complexity .It will be having the shortest running time and very productive for the large data.

Log N growth rate is when the function splits the data into two equal halves.N when it is working on the data one at a time.So the function will be doing the splitting N times.

Exponential growth rate is is the worst as the input grows the exponential function will grow very rapidly.

cubic will grow at the rate of n^3 and quadratic at the rate of n^2.

Hence the answer is N log N.

User Janniks
by
4.4k points