Question: Consider two algorithms A and B . Algorithm A requires 1 0 N 2 time and algorithm B requires 1 0 0 0 N time.

Consider two algorithms A and B. Algorithm A requires 10N2
time and algorithm B requires 1000N
time. Answer the following.
Which values of N will algorithm A execute slower than algorithm B?
10N210N21000N10N(N100)>1000N>0>0
This indicates for all N>100
, algorithm A performs worse than algorithm B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!