def climbStairs_save_memory(self, n):
        f_n_minus_2 = 1  # f(1)
        f_n_minus_1 = 2  # f(2)
        if n==1: return f_n_minus_2
        if n==2: return f_n_minus_1
        fn = 0
        for i in range(2, n):
            fn = f_n_minus_1 +f_n_minus_2
            # for next iteration, n = n+1
            f_n_minus_2 = f_n_minus_1
            f_n_minus_1 = fn
        return fn
DP. The transition function should be:
dataset/ETHPy150Open algorhythms/LeetCode/069 Climbing Stairs.py/Solution.climbStairs_save_memory