Searching algorithms Flashcards
1
Q
How does a linear search work
A
Used to find an item in a list.
It checks the first item, if it is not a match it moves onto the next until it is a match
2
Q
How does a binary search work
A
Needs an ordered list.
It continuously divides the list in half until the item is found.