Amazon Interview Question

Longest common substring from leetcode