a) Give a recursive algorithm for finding the max of a finite set of integers, making use of the fact that the max of n integers is the larger of the last integer in the list and the max of the first n-1 integers in the list.
return power(x,n-1) · x
b) Use induction to prove your algorithm is correct
Get Answers For Free
Most questions answered within 1 hours.