common algorithms Flashcards
1
Q
what are the 2 methods of searching?
A
linear and binary
2
Q
what are the 3 methods of sorting?
A
merge
bubble
insertion
3
Q
advantage and disadvantage of a linear search
A
adv: data does not have to be ordered
disadv: extremely inefficient and very slow
4
Q
advantages and disadvantage of a binary search:
A
asv: very efficient as half of the data is filtered through in a singular pass, a lot quicker
disadv: data would need to be ordered