Question: complete this question please Example 1: (Algorithms Analysis) For an O(2) algorithm, a friend tells you that it took 17 seconds to run on her
Example 1: (Algorithms Analysis) For an O(2") algorithm, a friend tells you that it took 17 seconds to run on her data set on a O(2") algorithm. You run the same program, on the same machine, and your data set with n- 7 takes 68 seconds. What size was her data set? Solution: Let running time of the algorithm on an input of size 'n' be Tin). Then T(n)-C (2") for some constant For data set with n - 7. it gives T(7) -C (2) 68 - (128) C68/128 - 17/32 Now, to find the size of data set for our friend, we again use the same formula
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
