Solve the sparse matrix problems described in class.
CLR Problem 1-2 (pg 17-18).
CLR Problem 1-3 (pg 18).
Low values of the insertion index are very common in practical
applications. Why? Argue that insertion sort and bubblesort take
O(kn) time on lists with insertion index k. Show that both can
actually run even faster: for insertion index k=n/2 for
some lists.
Say why mergesort can take even for k=1. What
simple change can we make to mergesort to help? Analyze the effect of
this improvement for k=1. Can you extend your argument to arbitrary
k to get a bound for mergesort?