Divide-and-Conquer algorithms Flashcards

1
Q

Each node in Recursion tree

A

Each node is labeled with the size of the problem being solved.

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

Each level is labeled in Recursion tree

A

Each level is labeled with the number of steps (excluding recursive calls).

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

Total running time of the algorithm in Recursion tree

A

Total running time of the algorithm is the sum of all the steps in each level.

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

Master Theorem if a = b^c

A

T(n) = O(n^clogn)

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

Master Theorem if a < b^c

A

T(n) = O(n^c)

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

Master Theorem if a > b^c

A

T(n) = O(n^logba)

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

Divide and Conquer Technique

A

○ Break input into roughly equal halves (Divide).
○ Solve the problem in each of the halves (Conquer).
○ Put together solution to the whole problem (Combine).

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