Skip to content

Commit 694745d

Browse files
authored
Update add_binary.py
1 parent 52d6581 commit 694745d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

add_binary.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
# @param {string} a a number
@@ -25,4 +25,6 @@ def addBinary(self, a, b):
2525
c_i -= 1
2626
if flag:
2727
ret += str(flag)
28-
return ret[::-1] # Python没有提供直接反转字符串的函数,用切片凑合一下吧。
28+
return ret[::-1] # Python没有提供直接反转字符串的函数,用切片凑合一下吧。
29+
30+
# easy: http://lintcode.com/zh-cn/problem/add-binary/

0 commit comments

Comments
 (0)