what’s wrong with this solution?? why is this giving segmentation fault??
Segmentation fault?
hello @Shobhit_kumar
u need to build from thr bottom na.
i.e ur dp[i][j] ,depends upon dp[i-1][j-1] and dp[i][j-1] right?
so start filling dp from i=1 and j=1
ooohh yess sorry i was just thinking of top-down and so implemented that only​:sweat_smile:
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.