Autumn Term 2 Mr White Flashcards

1
Q

what are the different ways to search a list?

A

linear, binary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

advantages of linear searches

A

quick and easy to implement
works just fine in small amounts of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

disadvantages of linear searches

A

slow in long lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly