You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Question: Given a number of stairs to climb, you can climb it by taking 2 steps or 1 at a time, return the number of possible combinations you could climb them.
#Solution: Each stair depends on the number of ways you can climb the previous + number of ways you can count the 2nd previous step
#Difficulty: Easy
def climbStairs(n):
#Initialize a array to hold the number of combinations at each step, initialize step 0 and step 1 to 1 because they only have 1 combination (no steps and 1 step)