def climbStairs(self, n):
        if n==1: return 1
        if n==2: return 2
        f = [0 for _ in xrange(n+1)]
        f[0] = 0
        f[1] = 1
        f[2] = 2
        for i in xrange(3, n+1):
            f[i] = f[i-1]+f[i-2]
        return f[n]
DP. The transition function should be:
dataset/ETHPy150Open algorhythms/LeetCode/069 Climbing Stairs.py/Solution.climbStairs