SIMPLE TO UNDERSTAND
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```\nclass Solution {\n    public int[] addNegabinary(int[] arr1, int[] arr2) {\n//         int num1 = first(arr1);\n//         int num2 = first(arr2);\n//         int sum = num1 +num2;\n//         String bin = Integer.tobinaryString(sum);\n//         int [] ans = new int[bin.length()];\n//         for(int i = 0;i<ans.length();i++){\n//             ans[i]=bin.charAt(i)-\'0\';\n//         }\n//         return ans;\n//     }\n// }\n// public int first(int[] arr){\n//     //int ans = 0;\n//     int j = 0\n//     for(int i = arr.length-1;i>0;i--){\n//       int  ans = ans + (arr[i])*(2)^j;\n//         j++;\n\nList<Integer> digits = new ArrayList<>();\n        int carry = 0;\n        for (int i = 0; i < Math.max(arr1.length, arr2.length) || carry != 0; i++){\n            int d1 = 0;\n            if (i < arr1.length){\n                d1 = arr1[arr1.length - 1 - i];\n            }\n            int d2 = 0;\n            if (i < arr2.length){\n                d2 = arr2[arr2.length - 1 - i];\n            }\n            digits.add(Math.abs(d1 + d2 + carry) % 2);\n            if (d1 + d2 + carry < 0){\n                carry = (Math.abs(d1 + d2 + carry) + 1) / 2;\n            }else{\n                carry = -(d1 + d2 + carry) / 2;\n            }\n        }\n        Collections.reverse(digits);\n        while(digits.size() > 1 && digits.get(0) == 0){\n            digits.remove(0);\n        }\n        return digits.stream().mapToInt(i -> i).toArray();\n\n    }\n\n}\n```
['Java']