Given two binary strings a and b, 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"
Pseudocode
- parseIns(string), start summing up from the end
- if > 2, bring forward + 1
- two main conditions, if bring forward is 1 or 0
- if bringforward 0
- 1 + 1 = 0, bringforward++
- etc etc
- if bringforward 1
- 1 + 0 = 1, bringforward++
- 1 + 1 = 1, bringforward++