Java&JS&TS Solution (JW)
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```java []\npublic int similarPairs(String[] words) {\n    Map<Integer, Integer> map = new HashMap<>();\n    for (String word : words) {\n        int signature = 0;\n        for (char c : word.toCharArray()) {\n            signature |= 1 << (c - \'a\');\n        }\n        map.put(signature, map.getOrDefault(signature, 0) + 1);\n    }\n    int count = 0;\n    for (int freq : map.values()) {\n        if (freq >= 2) {\n            count += freq * (freq - 1) / 2;\n        }\n    }\n    return count;\n}\n```\n```javascript []\nvar similarPairs = function(words) {\n    const map = new Map();\n    for (let word of words) {\n        let signature = 0;\n        for (let c of word) {\n            const bit = c.charCodeAt(0) - \'a\'.charCodeAt(0);\n            signature |= 1 << bit;\n        }\n        map.set(signature, (map.get(signature) || 0) + 1);\n    }\n    let count = 0;\n    for (let freq of map.values()) {\n        if (freq >= 2) {\n            count += freq * (freq - 1) / 2;\n        }\n    }\n    return count;\n};\n```\n```typescript []\nfunction similarPairs(words: string[]): number {\n    const map: Map<number, number> = new Map();\n\n    for (const word of words) {\n        let signature: number = 0;\n        for (const c of word) {\n            const bit: number = c.charCodeAt(0) - \'a\'.charCodeAt(0);\n            signature |= 1 << bit;\n        }\n        map.set(signature, (map.get(signature) ?? 0) + 1);\n    }\n\n    let count: number = 0;\n    for (const freq of map.values()) {\n        if (freq >= 2) {\n            count += (freq * (freq - 1)) / 2;\n        }\n    }\n\n    return count;\n};\n```
['Array', 'Java', 'TypeScript', 'JavaScript']