Binary and Linear Search [2.4] Flashcards
1
Q
How does a Binary Search work?
A
Immediately checks midpoint of list and discards irrelevant half.
2
Q
How does a Linear Search work?
A
A linear search is the simplest method of searching a data set.
Starting at the beginning of the data set, each item of data is examined until a match is made. Once the item is found, the search ends.
3
Q
What are the conditions needed to carry out a Binary search?
A
The numbers must be ordered.
4
Q
What can Linear search do that Binary cannot?
A
Search unordered lists.