Time: Beats %100, Memory: Beats 82.76%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public int[] addNegabinary(int[] arr1, int[] arr2) {\n        Stack<Byte> rets = new Stack<>();\n        int i = arr1.length - 1;\n        int j = arr2.length - 1;\n        // \u8FDB\u4F4D\u503C\u3002 \u4E24\u4E2A\u6570\u7EC4\u4E2D\u7684\u5143\u7D20\uFF0C\u5747\u4E3A 0,1, \u6240\u4EE5\u52A0\u4E00\u5757\u7684\u503C\u6709 0,1,2 \u4E09\u79CD\u53EF\u80FD\u3002 \u5982\u679C\u518D\u52A0\u4E0A\u8FDB\u4F4D\uFF0C\u6700\u7EC8\u53EF\u80FD\u4E3A 3\n        // \u5F53\u524D\u4F4D\u5E94\u8BE5\u4FDD\u7559\u7684\u503C\u53EF\u4EE5\u7528 current&1 \u8BA1\u7B97, \u663E\u7136 0&1=0\uFF0C 2&1=0, \u800C 1&1=1, 3&1=1\n        // \u8FDB\u4F4D\u503C\u8BA1\u7B97\u53EF\u4EE5 \u4F7F\u7528 current>>1 \u8BA1\u7B97, 0>>1=0, 1>>1=0, 2>>1=1, 3>>1=1\uFF0C\u663E\u7136\u53EA\u6709\u548C\u4E3A 2\u30013\u65F6\u624D\u9700\u8981\u8FDB\u4F4D\n        // \u8FDB\u4F4D\u4E3A\u4EC0\u4E48\u8981\u8F6C\u6210 \u8D1F\u6570\uFF1F\n        byte carry = 0;\n        byte current = 0;\n\n        while (i >= 0 || j >= 0 || carry != 0) {\n            current = carry;\n\n            if (i >= 0) {\n                current += arr1[i];\n            }\n\n            if (j >= 0) {\n                current += arr2[j];\n            }\n\n            rets.push( (byte)(current&1));\n            carry = (byte) -(current >> 1);\n            --i;\n            --j;\n        }\n\n        while (rets.size() > 1 && rets.peek() == 0) {\n            rets.pop();\n        }\n\n        int[] nums = new int[rets.size()];\n        int p = 0;\n        while(!rets.isEmpty()) {\n            nums[p++] = rets.pop();\n        }\n        return nums;\n    }\n}\n```
['Java']