| 12 | class Solution { |
| 13 | public: |
| 14 | int climbStairs(int n) { |
| 15 | vector <int> fib (n+1, 1); |
| 16 | for (int i=2; i<=n;i++) { |
| 17 | fib[i] = fib[i-1] + fib[i-2]; |
| 18 | } |
| 19 | // for (int i: fib) cout << i; |
| 20 | return fib[n]; |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | int main() { |
nothing calls this directly
no outgoing calls
no test coverage detected