Problems / Add Binary Strings
Easy

Add Binary Strings

Easy 243 submissions 10 coins +50 XP
Bit Manipulation Math String
Problem Description
Given two binary strings `a` and `b` (no leading zeros except `"0"`), return their sum as a binary string. **Example 1:** ``` Input: a = "11", b = "1" Output: 100 ``` **Example 2:** ``` Input: a = "1010", b = "1011" Output: 10101 ``` **Example 3:** ``` Input: a = "0", b = "0" Output: 0 ```
Constraints
- `1 <= a.length, b.length <= 10^4` - Only `'0'` and `'1'`.

Need help?

Connect with expert programmers for real-time collaborative coding, video meetings, and whiteboard sessions via CodeConnect.

Video Call Whiteboard Live Coding Screen Share