LeetCode p67 Add Binary 题解
1.题目:
Given two binary strings, return their sum (also a binary string).
For example,
a = “11”
b = “1”
Return “100”.
题意:
模拟二进制加法,输出二进制和。
2.解题思路:
见代码
3.代码
1 |
|
很高兴遇见你~
Given two binary strings, return their sum (also a binary string).
For example,
a = “11”
b = “1”
Return “100”.
题意:
模拟二进制加法,输出二进制和。
见代码
1 |
|