When n=0,sir is saying that there is one way thats why we are returning 1

Can you explaiin this

hello @KetanPandey
this is done to make implementation easy , not any other reason .
if u dont want to return 1 when n=0
then simply add two more base cases
ie
if n==0 return 0
if n==1 return 1
if n==2 return 2

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.