• + 2 comments

    You just have to figure a way to break this problem into subproblems. Be it from the front or back. I broke this problem into sub problems by taking into consideration the last character in each string. So in the memoization I will start from the front. Watch some string related dynamic programming videos on youtube to get an intuition. https://www.youtube.com/watch?v=NnD96abizww