Add Binary
Easy
Strings
Math
String
Bit Manipulation
Given two binary strings, return their sum as a binary string.
Constraints
1 ≤ lengths ≤ 10^4
Examples
Example 1:
Input: 11
1
Output: 100
Example 2:
Input: 1010
1011
Output: 10101
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console