Customer Support: email@example.com
We are listening to your every feedback,
and taking action to constantly improve your learning experience.
If you have any feedback, please use this form:
- If you are a student, email to firstname.lastname@example.org to get special student discount.
Problem Statement:Given two strings find length of the longest common substring.
Solution:If we keep the template discussed in 2-Strings DP in mind, this problem very easily transforms to: for all substrings in the two given strings, find the Longest Common SUFFIX. Why and How ? If the given two strings are str1 = "hackathoncode" and str2 = "marathonsprint", the longest common substring is "athon" which is the longest common SUFFIX for the substrings "hackathon" and "marathon".
This is a Premium content. Please subscribe to access the code.
After subscribing please come back and refresh this page.
One of my goals is to make you very comfortable with bottom-up tabulation approach of solving Dynamic Programming. I hope you are getting the hang of it by now.
The above content is written by:
If you have any feedback, please use this form: https://thealgorists.com/Feedback.
Follow Us On LinkedIn