illuminati
1 min
Problem: Add Binary Strings
Given two binary strings, return their sum (also a binary string).
a = "100" -> 4 in decimal
b = "11" -> 3 in decimal
Return a + b = “111” -> 7 in decimal
How will you add two binary numbers on paper? Just try implementing that approach.
O(N), where N is the size of input string.