#18 algorithm analysis Flashcards

1
Q

types of cases

A

best
worst
average
amortized

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

best case

A

smallest number of steps required

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

worst case

A

largest number of steps required

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

average case

A

number of steps required for a “typical” case

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

two types of average cases

A

average case: average over all cases

expected case: a weighted average based on likelihood of each case

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