common algorithms Flashcards

1
Q

what are the 2 methods of searching?

A

linear and binary

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

what are the 3 methods of sorting?

A

merge
bubble
insertion

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

advantage and disadvantage of a linear search

A

adv: data does not have to be ordered
disadv: extremely inefficient and very slow

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

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