Bit mask kotlin solution
Idea here is to mask every string to be represented as an integer. \nThen we just need to group these numbers and calculate the answer.\n\nclass Solution {\n   
Idea here is to mask every string to be represented as an integer. \nThen we just need to group these numbers and calculate the answer.\n```\nclass Solution {\n    fun similarPairs(words: Array<String>): Int {\n        return words.map(String::mask)\n            .groupingBy { it }\n            .eachCount()\n            .values\n            .map { (it) * (it - 1) / 2 }\n            .sum()\n    }\n}\n\nfun String.mask() = toList()\n    .distinct()\n    .map { 1 shl (it - \'a\') }\n    .sum()\n```
['Bitmask', 'Kotlin']