Week 2: Recursive Algorithm Time Complexity Flashcards

1
Q

What are activation records?

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

What information is stored when a new activation record is created?

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

What params are stored in the execution stack when the main function calls BinarySearch(L, x, 0, n-1)?

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

What are stored in each execution stack for each recursive call for the following binary search function?

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

What method is used to solve the time complexity of recursive algorithms?

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

What two cases are needed to compute the time complexity of binary search?

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

What is the base case for the following algorithm? Why?

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

Examine the following:

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

What is the amount of elements examined in the first recursive call made by the binary search algorithm?

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

What are the base case and recursive case for binary search in terms of time complexity?

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

What equation do you use to represent recursive algorithm time complexities?

A

Recurrence equation:

Base case + recursive case

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

What method do you use to solve recurrence equations for recursive time complexities?

A

Repeated substitution

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

Examine the following representations for linear search and bvinary search:

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

Examine and understand the repeated substitution method for binary search

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

Example of comparing orders:

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

Another example of comparing orders

A
17
Q

Examine the following complexity classes:

A