Week 9 Flashcards

1
Q

What is the recurrence for Merge Sort?

A

T(n) <- 2 x T(n/2) + O(n)

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

What are the two methods to solve recurrences?

A

Unrolling
- Analyse first few levels - Identify pattern - Sum over all levels
- Need no idea about the final answer

Verifying by substitution
- Works if you have a guess

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

What does log(n / 2) equal?

A

log(n/2) = log n - 1

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

What is the geometric series sum?

A

1 + r + … + r^t = (r ^ t+1) - 1 / r - 1

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