Add Binary
Easy
String
Math
Binary
Simulation
Given two binary strings a and b, return their sum as a binary string.
Examples:
Input:
["11","1"]Output:
"100"Input:
["1010","1011"]Output:
"10101"Constraints:
- 1 ≤ a.length, b.length ≤ 10⁴
- a and b consist only of '0' or '1' characters.
- Each string does not contain leading zeros except for the zero itself.
Code Editor
Loading advanced editor...
Console Output
Ready to execute
Click "Run Code" to see your output here