Fibonacci Sequence Related problems
- Decode Ways
- Unique Paths
- Climbing Stairs
Unique Path and climbing stairs are very classic fibonacci problems, so those go without saying anything. but decode ways is not easy to related with fibonacci sequence.
I have an article about decode way series questions. the general solution for such problem is for a fixed i, check the s.charAt(i-1) and s.charAt(i-2). and find when should we use dp[i-1] or dp[i-2].

浙公网安备 33010602011771号