Rust Solution
Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\n\n# Code\n\nimpl Solution {\n  pub fn add_negabinary(mut arr1: Vec<i32>, mut arr2: Vec<i32>) 
# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```\nimpl Solution {\n  pub fn add_negabinary(mut arr1: Vec<i32>, mut arr2: Vec<i32>) -> Vec<i32> {\n    arr1.reverse();\n    arr2.reverse();\n    let n = arr1.len();\n    let m = arr2.len();\n    let mut result = vec![0;n.max(m)+5];\n    for i in 0..n.max(m)+2 {\n      let mut v = result[i];\n      if i < n {\n        v += arr1[i];\n      }\n      if i < m {\n        v += arr2[i];\n      }\n\n      if v == 3 {\n        result[i+1] -= 1;\n        result[i] = 1;\n      } else if v == 2 {\n        result[i+1] -= 1;\n        result[i] = 0;\n      } else if v >= 0 {\n        result[i] = v;\n      } else if v == -1 {\n        result[i+1] += 1;\n        result[i] = 1;\n      }\n    }\n\n    while result.len() > 1 && result[result.len()-1] == 0 {\n      result.pop();\n    }\n    result.reverse();\n    result\n  }\n}\n```
['Rust']