171k views
5 votes
. Reorder the following efficiencies from smallest to largest:

a. 2n
b. n!
c. n5
d. 10,000
e. nlog(n)

User Johnnieb
by
5.5k points

1 Answer

2 votes

Answer:

The order of the efficiencies is as following:-

10,000 < 2n < nlog(n) < n5 < n!.

Step-by-step explanation:

10,000 is constant time whatever will be the size of the problem the efficiency will remain the same.

2n this efficiency is linear it will grow proportionally as the size of the problem increases.

nlog(n) this efficiency is is a bit greater than 2n though it will grow faster than 2n but slower than n2 as the size of the problem increases.

n5 this efficiency is very poor.It is growing very rapidly as the size of the problem increases.

n! is the worst efficiency of them all.

n!=n*(n-1)*(n-2)*(n-3)*(n-4)*.......2*1.

It will grow beanstalk in jack and the beanstalk.

User Ekampp
by
5.1k points