Longestpalindromicsubsequence

ques:https://practice.geeksforgeeks.org/problems/longest-palindromic-subsequence/0 code:https://ide.codingblocks.com/#/s/13844 my bottom up ans is passed but top down is not can you tell why when i saw some other solutions top down was passed (edited)