Skip to content

Commit d00d050

Browse files
Create Climbing Stairs.cs
1 parent 5293fe6 commit d00d050

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class Solution {
2+
//OM GAN GANAPATHAYE NAMO NAMAH
3+
//JAI SHRI RAM
4+
//JAI BAJRANGBALI
5+
//AMME NARAYANA, DEVI NARAYANA, LAKSHMI NARAYANA, BHADRE NARAYANA
6+
public int ClimbStairs(int n) {
7+
if(n == 1 || n == 2)
8+
return n;
9+
else
10+
return ClimbStairs(n-1) + ClimbStairs(n-2);
11+
}
12+
}

0 commit comments

Comments
 (0)