Search and sorts Flashcards

1
Q

linear search

A

searches each value from start to finish until item located

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

binary search

A

better, only works on sorted lists
divides list into 2, compares and discards the side its not it, repeat

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

bubble sort

A

compares n and n+1, swaps if nessecary, repeats until no swaps are made in a pass

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

insertion sort

A

creates list of size 1, then ads unsorted list to the correct position in the new list

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

Merge sort

A

seperate to individual elements, pair up in sorted order, repeat (faster, difficult to code)

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