Count Pairs Of Similar Strings Leetcode