[C++][Bit addition + carry] Easy to understand solution, beats 100%
Important Point to note\nCarry from ith term will always have to be subtracted from next whether it is odd power or even power. \neg : if for 2nd term(-2^2)  we
**Important Point to note**\nCarry from ith term will always have to be subtracted from next whether it is odd power or even power. \neg : if for 2nd term(-2^2)  we have both entries as 1(Carry 0), we have 4 + 4 = 8( i.e. 1 + 1 = 0, carry = 1)\nSo, for 3rd term(-2^3) i.e -8, if we have either entry as 1, we need to ignore one, giving the effect of **+8**(from carry) -**8**.\n   \nThe only exception to this rule is when both terms are 0. This implies that we will have to forward the carry to next. But since that will cause double the val to be added/subtracted, we will update current to be 1 as well\n\n           Example:         C:    1   0  -1   1      \n                                      1   0  |0|  1\n                                      1   0  |0|  1\n                               +      0   1   1   0\n           since carry == 1, prepend 11 to result.\n\t\t   Final value  = 1 1 0 1 1 0\n\nHope it helps :)\nAny comments, please feel free to share.\n```\nclass Solution {\npublic:\n    vector<int> addNegabinary(vector<int>& arr1, vector<int>& arr2) {\n        vector<int> res;\n        if(arr1.size() < arr2.size()) swap(arr1, arr2);\n        int i1, i2, dig, carry = 0;\n        for(int i = 0; i < arr1.size(); i++){\n            i1 = arr1[arr1.size() - 1 - i];\n            i2 = (i < arr2.size() ? arr2[arr2.size()-1-i] : 0);\n            \n            dig = i1+i2-carry;\n            if(dig < 0){\n                res.push_back(1);\n                //This ensures that for the next ith terms, we add the carry instead of subtracting, because this carry is not from this but previous term.\n                carry = -1;\n            }else{\n                carry = dig/2;\n                res.push_back(dig%2);\n            }\n        }\n        if(carry){\n            res.push_back(1);\n            res.push_back(1);\n        }\n        \n        for(int i = res.size() -1; i >= 0; i--){\n            if(res[i] != 0) break;\n            res.pop_back();\n        }\n        if(res.size() == 0) return {0};\n        reverse(res.begin(), res.end());\n        return res;\n    }\n};\n```
['C']