9.2-3, 10.3-1, 10.3-3, 10.3-7, 10.3-8 and
Describe an algorithm that, given n integers in the range 1 to
k, preprocesses its input and then answers any query about which is
the
smallest number in O(1) time. Your algorithm should
use O(n+k) preprocessing time. (Hint: This problem is similar to the
problem 9.2-5, which you did in the last homework.)