Autumn Term 2 Mr White Flashcards
1
Q
what are the different ways to search a list?
A
linear, binary
2
Q
advantages of linear searches
A
quick and easy to implement
works just fine in small amounts of data
3
Q
disadvantages of linear searches
A
slow in long lists
4
Q
how does bubble sort work
A
compares the pairs in a list, swapping them if they are the wrong way round. Quite slow in long lists
5
Q
how does insertion sort work?
A
two lists, a sorted and unsorted list. You gradually add items to the sorted list, comparing the value to the other items starting at the top