Search Insert Position
Description https://oj.leetcode.com/problems/climbing-stairs/ Difficulty: 0.5/5 star Analysis It is the simplest DP problem. The only trick here is that we can solve it with constant space. class Solution { public: int climbStairs(int n) { int numDistinctWays[3] = {1, 1, 2}; for...