Solution
C++ []\nclass Solution {\npublic:\n    vector<int> addNegabinary(vector<int> &arr1, vector<int> &arr2)\n    {\n        reverse(arr1.begin(), arr1.end());\n     
```C++ []\nclass Solution {\npublic:\n    vector<int> addNegabinary(vector<int> &arr1, vector<int> &arr2)\n    {\n        reverse(arr1.begin(), arr1.end());\n        reverse(arr2.begin(), arr2.end());\n        if (arr1.size() < arr2.size())\n            swap(arr1, arr2);\n        int carry = 0;\n        for (int i = 0; i < arr1.size(); i++)\n        {\n            int cur = arr1[i];\n            if (i < arr2.size())\n                cur += arr2[i];\n            if (cur == 0 && carry == -1)\n            {\n                arr1[i] = 1;\n                carry = 1;\n            }\n            else\n            {\n                arr1[i] = (cur + carry) % 2;\n                carry = -(cur + carry >= 2);\n            }\n        }\n        if (carry != 0)\n            arr1.push_back(1);\n        if (carry == -1)\n            arr1.push_back(1);\n        while (arr1.size() > 1 && arr1.back() == 0)\n            arr1.pop_back();\n        reverse(arr1.begin(), arr1.end());\n        return arr1;\n    }\n};\n```\n\n```Python3 []\nclass Solution:\n    def addBinary(self, A, B):\n        res = []\n        carry = 0\n        while A or B or carry:\n            carry += (A or [0]).pop() + (B or [0]).pop()\n            res.append(carry & 1)\n            carry = carry >> 1\n        return res[::-1]\n\n    def addNegabinary(self, A, B):\n        res = []\n        carry = 0\n        while A or B or carry:\n            carry += (A or [0]).pop() + (B or [0]).pop()\n            res.append(carry & 1)\n            carry = -(carry >> 1)\n        while len(res) > 1 and res[-1] == 0:\n            res.pop()\n        return res[::-1]\n```\n\n```Java []\nclass Solution {\n    public int[] addNegabinary(int[] arr1, int[] arr2) {\n        \n        List<Integer> result = new ArrayList();\n        int pointer_1 = arr1.length-1;\n        int pointer_2 = arr2.length-1;\n\n        int carry = 0;\n        int current = 0;\n        int sum = 0;\n        \n        while(pointer_1 >= 0 || pointer_2 >= 0){\n            \n            int a = (pointer_1 >=0)? arr1[pointer_1]: 0;\n            int b = (pointer_2 >=0)? arr2[pointer_2]: 0;\n            \n            sum = a+b+carry;\n            if(sum == 3){\n                current = 1; carry = -1;\n            }\n            else if(sum == 2){\n                current = 0; carry = -1;\n            }\n            else if(sum == 1){\n                current = 1; carry = 0;\n            }\n            else if(sum == 0){\n                current = 0; carry = 0;\n            }\n            else if(sum == -1)\n            {\n                current = 1; carry = 1;\n            }\n            result.add(current);\n            pointer_1--;\n            pointer_2--;\n        }\n        if(carry != 0)\n            result.add(1);\n        if(carry == -1)\n            result.add(1);\n        \n        int idx = result.size()-1;\n        while(idx > 0 && result.get(idx) == 0)\n            idx--;\n        \n        int len = idx+1;\n        int[] negaBinary = new int[len];\n        for(int i=0; i<len; i++){\n            negaBinary[i] = result.get(idx);\n            idx--;\n        }\n        return negaBinary;\n    }\n}\n```
['C++', 'Java', 'Python3']