Add two numbers, then convert with negative base
Runtime: 64 ms, faster than 56.20%\nMemory Usage: 14.6 MB, less than 25.62%\n\nclass Solution:\n    def addNegabinary(self, arr1, arr2):\n        n = (sum(pow(-
Runtime: 64 ms, faster than 56.20%\nMemory Usage: 14.6 MB, less than 25.62%\n```\nclass Solution:\n    def addNegabinary(self, arr1, arr2):\n        n = (sum(pow(-2, i) for i, v in enumerate(arr1[::-1]) if v) +\n             sum(pow(-2, i) for i, v in enumerate(arr2[::-1]) if v))\n        res = [] if n else [0]\n        while n:\n            n, rem = divmod(n, -2)\n            if rem < 0:\n                n += 1\n            res.append(abs(rem))\n        res.reverse()\n        return res\n```
['Python', 'Python3']