Elixir Map Solution
\ndefmodule Solution do\n  use Bitwise\n\n  @spec similar_pairs(words :: [String.t()]) :: integer\n  def similar_pairs(words) do\n    words\n    |> Enum.reduce(
```\ndefmodule Solution do\n  use Bitwise\n\n  @spec similar_pairs(words :: [String.t()]) :: integer\n  def similar_pairs(words) do\n    words\n    |> Enum.reduce(%{}, fn w, acc ->\n      w\n      |> String.to_charlist()\n      |> Enum.reduce(0, fn c, acc ->\n        acc ||| 1 <<< (c - ?a)\n      end)\n      |> then(fn v -> Map.update(acc, v, 1, &(&1 + 1)) end)\n    end)\n    |> Enum.reduce(0, fn {_, v}, acc ->\n      acc + div(v * (v - 1), 2)\n    end)\n  end\nend\n```
['Elixir']