Leetcode Similar Strings Hackerrank Solutions Javascript Form