Recursion Flashcards

1
Q

An example to introduce Recursion;

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

Recursion : Fibonacci

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

Recursion : Sum (basic condition & array)

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

Recursion : find max in array

A

N = index of array (which is the biggest numbers of elements in the array)

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

Recursion : Hanoi

Hint:
1. n == how many layers
2.A means from where
3.B means cross where
4.C means destination

输入函数的n表示A一开始的层数,但是在每次递归中n表示A的第n层的东西怎么移动。

A

Move : 产生移动从第二个参数到第四个参数

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

Recursion : find_max from left to right index in array

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

Recursion : sum in array (from left to right)

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

Recursion : Bubble

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

Recursion : 找到最小公倍数

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