Add two binary strings
Company: Meta
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Quick Answer: This question evaluates proficiency with binary arithmetic and string manipulation, focusing on carry propagation and handling of very long inputs without relying on native integer conversion.
Constraints
- Inputs are Python literals matching the function signature.
- Return a deterministic exact-match value.
Examples
Input: ('1011','110')
Expected Output: '10001'
Explanation: 11 + 6 = 17.
Input: ('0','0')
Expected Output: '0'
Explanation: Zero plus zero is zero.
Input: ('1111','1')
Expected Output: '10000'
Explanation: Carry propagates across all digits.
Hints
- Clarify edge cases before coding.
- Keep outputs deterministic when several valid answers exist.