We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34c8ea2 commit 3da9da7Copy full SHA for 3da9da7
solution/070.Climbing Stairs/Solution.js
@@ -0,0 +1,9 @@
1
+const climbStairs = function(n){
2
+ let arr = [];
3
+ arr[0] = 1;
4
+ arr[1] = 1;
5
+ for(let i = 2; i <= n; i++){
6
+ arr[i] = arr[i-1]+arr[i-2];
7
+ }
8
+ return arr[n];
9
+};
0 commit comments