All right, so this is going to be a short lecture.
It's not really much of a lecture, it's another one of those challenges for you.
And this is going to be a searching challenge.
So we just went over sorting and now we are going to go over something called searching.
So what I would like you to do is to make a function and a program, of course, but make a function
that takes an array or a vector and an integer as an argument.
So there must be arguments they should both be parameters, then that function should return a Boolean
value based on whether the integer is in the array or vector or not.
So there's that second argument is going to be a number and you want to see if that number exists inside
the vectors array.
So this function should be part of an overall program that lets the user enter five integers to get
read into that array or vectors.
So similar to like what we did with the sorting.
And then it should ask for two more integers that get added up to a sum that then gives sent to that
function as that number that you need to search for.
So hopefully, that's pretty straightforward.
You can see some examples here.
So these are all the numbers that would be read into that vector or array.
And then here are the two numbers that the user enters and they added together.
So this example seven percent and 14, you know, same message prints out message prints out down there.
The buttons has seven plus seven equals.
14 is not in the list because you notice that there is No.
14 here.
This one right here, though, the user interest at three and two for the numbers, and it's the same
set of numbers in that vector.
It says that three plus two equals five.
Five is right here in the list.
So if this is in the list and so this is what should print out.
So this one, I think, is a little easier than the sorting, but still a good exercise.
So I won't go ahead and leave you to it here.
And then in the next video, I will go over a solution to a very basic searching algorithm.
The most primitive searching algorithm, kind of like how I started off a bubble saw it as the most
primitive sort.
Now we're going to talk about the most primitive searching algorithm, but you can come up with any
type of search you would like for this.
But the point is just to solve the problem right now, so it prints out the correct answer.
All right, so without seeing the next lecture?