Top-down is not working fine
Initialize dp with -1, not 0
sir initialized with 0 in video and it was working fine and it is not working with -1 either.
code- https://ide.codingblocks.com/s/322670
I see you’ve changed your code. Is it working fine now?