[Python] Clean and documented code
\nfrom typing import List\n\n\nclass Solution:\n    def findMaximumXOR(self, nums: List[int]) -> int:\n        """\n        let ni and nj be the numbers such th
```\nfrom typing import List\n\n\nclass Solution:\n    def findMaximumXOR(self, nums: List[int]) -> int:\n        """\n        let ni and nj be the numbers such that xor between them produces maximum\n        value among other pairs. let m be the max value.\n\n        m = ni ^ nj\n        => m ^ nj = (ni ^ nj) ^ nj\n        =>        = ni ^ (nj ^ nj) # xor is associative\n        =>        = ni ^ 0\n        =>        = ni\n\n        so, m ^ nj = ni\n\n        We note that m is 31-bit integer so we guess bits of m and and with each nj,\n        we check if the combination of m and nj will produce ni.\n\n        So time complexity becomes O(32N) = O(N)\n        :param nums:\n        :return:\n        """\n        m, mask = 0, 0\n\n        for i in range(32)[::-1]:\n            mask |= 1 << i\n            prefixes = {n & mask for n in nums}\n\n            tmp = m | (1 << i)\n\n            if any(prefix ^ tmp in prefixes for prefix in prefixes):\n                m = tmp\n\n        return m\n```
['Bit Manipulation', 'Python']