Leetcode Algorithms -- Add Binary
Add Binary (Easy)
Description
Given two binary strings, return their sum (also a binary string).
For example,
a = “11”
b = “1”
Return “100”.
Analysis
模拟大数加法
My Solution
1 | //C++ |
Given two binary strings, return their sum (also a binary string).
For example,
a = “11”
b = “1”
Return “100”.
模拟大数加法
1 | //C++ |