Question: 14. The problem is to sort a list containing n distinct integers that range in value from 1 to kn inclusive where k is a
14. The problem is to sort a list containing n distinct integers that range in value from 1 to kn inclusive where k is a fixed positive integer. Design an algorithm to solve the problem in (n) time.
15. Two algorithms take respectively 1000log n and 10n2 time where the base of logarithms is 2. Compute the value of n at which the first algorithms begins to show faster performance.
16. Assume you have an algorithm of complexity n and a computer that takes one unit of time to execute the algorithm when n=1000. If you buy a new computer that runs 1000 times faster, for what value of n would you be able to execute your algorithm in one unit of time? How will your answer change if you have algorithms of complexity n3 and 10n respectively?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
