Unformatted text preview: f ( n-1) + n 2 . 2) Give a recursive algorithm for Fnding the maximum of a Fnite set of in-tegers. input: a 1 , . . ., a n if n = 1 then m = a 1 else m = max( a 1 , . . . , a n-1 ) if a n > m then m := a n output m 1...
View Full Document
This note was uploaded on 08/11/2008 for the course MATH 240 taught by Professor Miller during the Fall '08 term at University of Wisconsin.
- Fall '08