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
Core interview problems are free with a full runner and lessons; Pro opens the complete library.