Searching Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does a Binary Search do?

A
Looks for items in an ordered list.
1. Find the middle
2. Find the item then stop
3. if it comes before the first half get rid of the second half and vise versa
and repeat process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a linear search do?

A

It will go through each item starting from the beginning until it finds the item your looking for

How well did you know this?
1
Not at all
2
3
4
5
Perfectly