Grokking Dynamic Programming Patterns for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
For n == 0, "base case, we don't need to take any step, so there is only one way...

Sreeraj Punnoli

Dec 11, 2022

For n == 0, "base case, we don't need to take any step, so there is only one way". Why is it like that? If n is 0, there is no stairs and no way. Why is the result 1 for n ==0?

1

0

Comments
Comments
Ronaldo Manfredini
Ronaldo Manfredini7 months ago

I also didn't understand this one. Additionally, the constraints say 1 <= n so???

On this page