Dynamic ProgrammingFibonacci
You are climbing a staircase with n steps. Each time you can climb 1 or 2 steps. How many distinct ways can you reach the top?
Input: n = 2
Output: 2
(1+1) or (2) — 2 ways.
Input: n = 3
Output: 3
(1+1+1), (1+2), (2+1) — 3 ways.
AmazonGoogleAdobeZomato