Searching Algorithms
This lesson discusses how linear search works and explains the implementation of binary search in detail.
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:
...