We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Abbreviation
You are viewing a single comment's thread. Return to all 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