Doubt in bottom up approach

i have solved using bottom up approach but it is giving some error kindly check

@simi_1188 hey longest string wale function me thodi dikkt hai,please check this for error:

but i have also done same thing can u pls tell where my code is going wrong

@simi_1188 hey why you have reduced dp while finding string,isi me hi problem arrhi hai ,please ek bar mere wale code ko check kro and dry run kro only for that printing part ,you will get it.

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.