@@ -0,0 +1,1018 @@
+package leetcode;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/**%0A * https://oj.leetcode.com/problems/climbing-stairs/%0A */%0Apublic class Problem70 %7B%0A    public int climbStairs(int n) %7B%0A        Map%3CInteger, Integer%3E memo = new HashMap%3C%3E();%0A        return climbStairs(n, 1, memo) + climbStairs(n, 2, memo);%0A    %7D%0A    %0A    private int climbStairs(int n, int accu, Map%3CInteger, Integer%3E memo) %7B%0A        if (accu == n) %7B%0A            return 1;%0A        %7D else if (accu %3E n) %7B%0A            return 0;%0A        %7D else %7B%0A            int x = 0;%0A            if (memo.containsKey(accu + 1)) %7B%0A                x = memo.get(accu + 1);%0A            %7D else %7B%0A                x = climbStairs(n, accu + 1, memo);%0A            %7D%0A            memo.put(accu + 1, x);%0A            int y = 0;%0A            if (memo.containsKey(accu + 2)) %7B%0A                y = memo.get(accu + 2);%0A            %7D else %7B%0A                y = climbStairs(n, accu + 2, memo);%0A            %7D%0A            memo.put(accu + 2, y);%0A            return x + y;%0A        %7D%0A    %7D%0A%7D

Solve problem 70