Week 8 Flashcards

1
Q

What is Mutual Recursion?

A

When two functions recursively call each other.

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

How does a conditional statement relate to recursion?

A

It is used to control the flow of recursion and avoid infinite loops

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

What is a typical numeric base case?

A

0 or 1

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

What is a typical string base case?

A

“” or a single character

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

What is a typical sequence base case?

A

Empty brackets

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

How do you do list mutation?

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

What is infinite recursion?

A

When a recursive function does not terminate after a finite number of calls

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

What is a node in a linked list?

A

A value and pointer to the next node in a linked list.

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

What is traversal of linked lists?

A

The process of visiting each node in the list, often used for searching, modifying, or counting elements

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