implement Isomorphic and LongestCommonSubstring solutions