classSolution {publicintclimbStairs(int n) {if (n ==1) return1;int first =1;int second =2;for (int i =3; i <= n ; i++) {int third = first + second; first = second; second = third; }return second; }}
why return second? because our goal is to use 2 varibles to rotate the value, so