Easy · Math
Add binary
Given two binary strings a and b (only '0' and '1', no leading zeros except "0" itself), return their sum as a binary string.
Examples
Example 1
{
"a": "11",
"b": "1"
}Output: 100
Example 2
{
"a": "1010",
"b": "1011"
}Output: 10101
Rebuild it in the studio
Read every interview problem free. Ten rooms need no account. A token opens a problem in full — Pro never counts.