Add Binary
Given two binary strings a and b, return their sum as a binary string.

30:00

Add Binary
easy
Topics
Companies

Given two binary strings a and b, return their sum as a binary string.

Example 1:
Input: {"a":"11","b":"1"}
Output: 100
Constraints:
  • 1a.length,b.length1041 \leq a.\text{length}, b.\text{length} \leq 10^4

  • a and b consist only of '0' or '1' characters.

  • Each string does not contain leading zeros except for the zero itself.

Input
arr ={"a":"11","b":"1"}

Add binary strings

s
LR1011
t
10

Carry: 0

Variables
VariableValue
a11
b1
DepthFunction Call
Stack empty
0/4