Given two binary strings a and b, return their sum as a binary string.
a
b
a = "11", b = "1"
"100"
a = "1010", b = "1011"
"10101"
1 <= a.length, b.length <= 10^4 `a` and `b` only contain `0` and `1` characters.
Topics
Implement addBinary in the editor and return the answer — printing it is never graded.
addBinary
Problem 39 of 1146 in the arena