left and right, each a non-negative integer written in binary. Return their sum, also as a binary string.
The inputs have no leading zeros, except when the number itself is zero (then the string is "0"). The answer must not have leading zeros either.left='101', right='11' → '1000'
5 + 3 = 8, which is 1000 in binary.
left='0', right='110' → '110'
Adding zero changes nothing: 0 + 6 = 6.
left='1111', right='1' → '10000'
15 + 1 = 16: the carry ripples through every digit and adds a new one.
left.length, right.length ≤ 10⁴'0' and '1'"0" itselfleft='101', right='11'
'1000'
Run checks the first 3 tests in your browser. Submit checks all 82 tests on the server, hidden ones included.