Searching Algorithms
Let's study some famous and important searching algorithms including binary search!
We'll cover the following...
We'll cover the following...
Brute Force: Linear Search
This is the most simple searching algorithm and it is in time. In fact, give it a shot. You’ll probably be able to come up with it yourself!
How Linear Search works #
Go through each element one by one. When the element that you are searching for is found, return its index. Here are some slides to make things clearer:
Implementation #
Binary Search #
You must have already encountered ...