Longet Common Substring (Problem 45) - InfyTQ Solution in Python

Longet Common Substring (Problem 45)

InfyTQ Solution in Python


PROBLEM STATEMENT

UC Berkley CS61A Fall 2011 Midterm 2

Write a function longest_common_substring that takes two strings word1 and word2 and returns the maximum overlap between the strings.


Sample Input Expected Output
'pirate', 'teepee' 'te'
'fish', 'bowl' ''
'assured', 'measured' 'sured'
'catenation', 'concatenation' 'catenation'




SOLUTION
SHARE If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
Newer Posts Newer Posts Older Posts Older Posts

More posts

Comments

Post a Comment

Sponsored Content