BONUS: SEARCHING ALGORITHMS Flashcards
1
Q
what is a bubble sort
A
move through the list in order
if not, swap and go back to start
repeat until no swaps needed
2
Q
what is a merge sort
A
divide and conquer split into lists until they each contain 1 element
repeatedly merge and sort until only 1 list
3
Q
what is an insertion sort
A
divide into sorted and unsorted
move in one at a time
inefficient
4
Q
what is a binary search
A
requires data to be in order
more efficient
begins at mid point
higher lower
repeats
5
Q
A