This dp problem looks really hard at the first glance but if you have the fundamentals clear than you can solve it easily. It took me an hour to first do it through recursion then add memoization than use the bottom up tabulation method .
@prasad_soniya Yeah consistently doing DSA problems is hard specially the difficult ones where the concept seems a bit abstract and you are struggling to understand it . For me graphs and dp are a major problem right now working to understand them in depth.