Tag: climbingstairs
-
Data Structures & Algorithms – Dynamic Programming – Climbing Stairs
Problem: Given a step number in a stair case , find the number of ways you can reach that step in the staircase if you can make 1 or 2 steps at a time Input: 4 Output: 5 ways Since you can take any of the below sequence of steps: [1,1,1,1] , [1,2,1],[1,1,2] ,[2,1,1], [2,2]…