# Linear & Binary Search

Learn the concepts behind linear and binary search before implementing them in Python. Test your knowledge with two quizzes.

Start## Key Concepts

Review core concepts you need to learn to master this subject

Searching for smallest or largest value using linear search

Linear Search best case

Linear Search Complexity

Linear Search expressed as a Function

Return value of a linear search

Modification of linear search function

Linear search

Linear search as a part of complex searching problems

Searching for smallest or largest value using linear search

Searching for smallest or largest value using linear search

Linear search can be used to search for the smallest or largest value in an unsorted list rather than searching for a match. It can do so by keeping track of the largest (or smallest) value and updating as necessary as the algorithm iterates through the dataset.

```
Create a variable called max_value_index
Set max_value_index to the index of the first element of the search list
For each element in the search list
if element is greater than the element at max_value_index
Set max_value_index equal to the index of the element
return max_value_index
```

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory