00:01
Hello and welcome.
00:02
We are looking at chapter 5, section 4.
00:05
This is problem 10.
00:07
We're asked to write another recursive algorithm.
00:11
We want to find the maximum of a set of integers.
00:13
So if we just take a simple set of integers like this, i guess if it's a set, i should use curly brackets, but oh well.
00:29
If i have a set of integers like this, the way you could recursively, and using the hint they give us, you could recursively find the largest is take the last element and say and look at the largest between this subset essentially and this subset and if you keep breaking it down that way that has the makings of a of a recursive algorithm so we'll say procedure largest basically we're just naming the function largest and for the input let's see, let's read the question to make sure we get this right.
01:20
Maximum of a finite set of integers making use of the fact that the maximum of n integers is a larger of the last integer in the list and the maximum of the first n minus one integers in the list.
01:30
So we want the input here to be a list of positive integers.
01:38
All right, so let me just check real quick, make sure my notation is correct.
01:50
Yeah...