Linear & Bianry Search Algorithms Flashcards
1
Q
An algorithm
A
A sequence of instructions that perform a specific task when followed
2
Q
A computer program
A
An implementation of an algorithm
3
Q
Binary search
A
Continually divides list in 2, eliminating the item that cannot have your item in it
The list must be fully ordered first to eliminate with any certainty
4
Q
Linear search
A
Works by checking each element to see if it matches the code
Repeats until a match is found or whole list is checked
5
Q
Difference between linear and binary
A
Works by simplification where as linear is brute force