Skip to content

Commit b78f8af

Browse files
committed
up finish problem add binary
1 parent a16de33 commit b78f8af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/leetcode/string/add-binary.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function addBinary(a: string, b: string): string {
22
if (a.length == 0) return b
33
if (b.length == 0) return a
4-
if (a.length && b.length == 0) return '0'
4+
if (a.length == 0 && b.length == 0) return '0'
55
let sum = ''
66
let carry = 0
77
// 1010

0 commit comments

Comments
 (0)