def solve(self, cipher):
        """
        Algorithm:
        From the prospective of bit
        http://math.stackexchange.com/questions/712487/finding-xor-of-all-subsets
        :param cipher: the cipher
        """
        length, lst = cipher

        return reduce(lambda x, y: x | y, lst) * 2 ** (length - 1) % (10 ** 9 + 7)
dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Xoring Ninja.py/Solution.solve/original