Add Binary Strings, is a Strings related problem and in this post we will see how we can solve this challenge in C++

Given two binary strings, return their sum (also a binary string).

Example:

a = "100"

b = "11" Return a + b = “111”. if the digits sum upto 2 i.e 1 + 1 + 0 then digit is 0 and carry 1 if the digits sum upto 2 i.e 1 + 1 + 1 then digit is 1 and carry 0 reset the carry when the digits are zero reverse the string

Please check the main.cpp snippet for the solution.

This solution originally posted at: Github by @susantabiswas