in the base caseif(n==0) we should return 0 as there will be 0 ways.however it dosen’t give correct ans in this case.
code:https://ide.codingblocks.com/s/253238
What will be the base case
hello @bhaskar0_0
yeah u can do that ,but then add one more base .that is if n is 2 then return 2.
and then it will work fine.