One day you decide to sort data on your old
INTEL 8008
computer. If a mergesort algorithm in worst case takes 84 seconds to sort an input of size 256.
Which of the following closely approximates the maximum input size that can be sorted by the computer in a worst case runtime of 7 minutes?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Note that the worst-case sort time for Mergesort is approximately proportional to n lo g 2 ( n ) .
Note that 7 minutes is 5 times as long as 84 seconds. Thus, the maximum input size would be n such that n lo g 2 ( n ) = 5 ⋅ 2 5 6 lo g 2 ( 2 5 6 ) = 1 0 2 4 0 .
Checking the choices, 1 0 2 4 lo g 2 ( 1 0 2 4 ) = 1 0 2 4 0 , so 1024 is our answer.