JAVA EASY SOLUTION
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int similarPairs(String[] words) {\n        int n = words.length, \n        count = 0;\n        Set<Character> set1, set2;\n\n        for (int i = 0; i < n - 1; i++) {\n            set1 = new HashSet<>();\n            for (char c : words[i].toCharArray()) {\n                set1.add(c);\n            }\n            for (int j = i + 1; j < n; j++) {\n                set2 = new HashSet<>();\n                for (char c : words[j].toCharArray()) {\n                    set2.add(c);\n                }\n                if (set1.equals(set2)) \n                count++;\n            }\n        }\n\n        return count;\n    }\n}\n\n```
['Java']