This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 35
November 14, 1997
Please show your work clearly and give answers to the nearest tenth of a second.
------------------
Suppose that a program requires 2.0 seconds when run with 1000 array entries.
1. On the same machine, if the program is a Selection Sort, how long do you expect it to run if the number of array entries is increased to 2000?
2. On the same machine, if the program is a Linear Search, how long do you expect it to run if the number of array entries is increased to 2000?
3. On the same machine, fi the program is a binary search, how long do you expect it to run if the number of array entries is increased to 2000? (Remember that log base 2 of 1000 is approximately 10 and log base 2 of 2000 is approximately 11.)