CSCI 2720 Data Structures Spring 2004 Homework Assignment #4 Due at the start of class on Thursday March 25. Be sure to explain your answers when asked to do so. All the problems are from Ch. 5 of the text by Lewis and Denenberg, as modified by the special directions given for 4. Each problem or part is worth 10 points. Ch. 5: 4*, 13(a), 13(b)*, 20, 23(a), 23(b), 39, 41(a), 41(b)*, 42 * Special directions or hints below: 4 Directions: suppose that val_type * T is a table of length n*n*sizeof(val_type) bytes used to store the 2-dimensional array in row-major order; write C++ code to transform it to column-major order using O(1) extra space. 13(b) Hint: try numbering the possibly non-zero elements of your matrix in row major order; you should be able to see a pattern with respect to the row and column indices. 41(b) Hint: note that ps[j]-ps[j-1] <= 1 (explain why). This limits the total number of recursive calls to Extend( , ) in calculating ps[j] for j = 0, ..., |p|-1.