Algorithm efficiency=example problems


Question:

Algorithm Efficiency: Example Problems

Please help with these 2 problems in algorithm efficiency.

1. Rank the terms of the following function according to their order of growth. Give explanation.

            f(n) = 100n100 + 34n + log1000n + 43n + 20.001n/n100

2. Consider the following algorithm where n is a positive integer.

            for i←| n/2 | n do

         a← n-i

What is the efficiency class of this algorithm? Show your reasoning.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Algorithm efficiency=example problems
Reference No:- TGS01937204

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)