Common Substring In Two Strings Hackerrank Solution