go + 双指针

dp[n] = dp[n-1] + dp[n-2]

func jumpFloor( number int ) int {
    // write code here
    if number <=0 {
        return 0
    }
    if number == 1 {
        return 1
    }
    if number == 2 {
        return 2
    }

    n1 := 1
    n2 := 2

    for i:=3; i<= number; i++{
        sum := n1+n2
        n1 = n2
        n2 = sum
    }

    return n2
}