喵星拳击手# Joke - 肚皮舞运动
i*5
1 楼
/*
Stairs = {0..n}
At each stair step size of 1 or 2.
input: n
output: All possible sequences from 0 to n.
e.g. For input n = 3
output
0 1 2 3 0 1 3 0 2 3 */
I tried to use stack and recursion to solve this problem. Is there any
other solution?
Stairs = {0..n}
At each stair step size of 1 or 2.
input: n
output: All possible sequences from 0 to n.
e.g. For input n = 3
output
0 1 2 3 0 1 3 0 2 3 */
I tried to use stack and recursion to solve this problem. Is there any
other solution?