67. Add Binary
🟩 Easy
Question
Given two binary strings, return their sum (also a binary string).
The input strings are both non-empty and contains only characters 1
or 0
.
Example 1:
Example 2:
Complexity
Time complexity: O(n)
Space complexity: O(1)
Code
Last updated
Was this helpful?