Largest common subsequence by dynamic programming

whats wrong in my code logic this is giving wrong answer on both the cases

not ableto solve with bottom up also please help

Hey Shivam, share the link to your current code here, so that we can we will help you in debugging the code.

No problem sir, I ve solved the question