题解 | #跳台阶扩展问题#
跳台阶扩展问题
https://www.nowcoder.com/practice/22243d016f6b47f2a6928b4313c85387
class Solution { public: int jumpFloorII(int number) { int res[25] = {0}; res[0] = 1; res[1] = 1; for (int i = 2; i <= number; ++i) { res[i] = 2 * res[i-1]; } return res[number]; } };
2023-剑指-DP 文章被收录于专栏
2023-剑指-DP