Can you please share the bottom up approach code?

can you please share the bottom up approach code?

Hey @haseebshaik00 see this code , as it’s commented so you will be able to get at what step operations are we taking. Also try to do dry run to get the intuition for this problem.

can you please tell me where i am going wrong https://ide.codingblocks.com/s/391204

Just run a for loop to manually make all indexes 0 as by declaring int dp[][]={0} sometimes leave garbage value at random indexes.

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.