Beats 100%, negabinary to decimal then decimal to negabinary
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```\n# @param {Integer[]} arr1\n# @param {Integer[]} arr2\n# @return {Integer[]}\ndef add_negabinary(arr1, arr2)\n    num1 = find_value(arr1)\n    num2 = find_value(arr2)\n    to_base_neg2(num1 + num2)\nend\n\ndef find_value(arr)\n    sum = 0\n    arr.each_with_index do |el, i|\n        pos = arr.size - 1 - i\n        sum =  sum + (el *(-2) ** pos)\n    end\n    sum\nend\n\ndef to_base_neg2(num)\n  return [0] if num == 0\n\n  result = []\n  while num != 0\n    remainder = num % -2\n    num = num / -2\n\n    if remainder < 0\n      remainder += 2\n      num += 1\n    end\n\n    result << remainder\n  end\n\n  result.reverse\nend\n```
['Ruby']