Solutions for Introduction to algorithms second edition
2:1-2 In line 5 of INSERTION-SORT alter A[i] > key to A[i] < key in order to sort the elements in nonincreasing order. 2:1-3 Algorithm 1 LINEAR-SEARCH(A;v) Input: A = ha1;a2;:::ani and a value v. Output: An index i such that v = A[i] or nil if v 62A for i
www2.compute.dtu.dk |