Skip to content

Commit 18d0086

Browse files
authored
Update gray_code.py
1 parent a58dddf commit 18d0086

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gray_code.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 {int} n a number
@@ -8,4 +8,6 @@ def grayCode(self, n):
88
ret = []
99
for i in xrange(1 << n):
1010
ret.append((i >> 1) ^ i)
11-
return ret
11+
return ret
12+
13+
# medium: http://lintcode.com/zh-cn/problem/gray-code/

0 commit comments

Comments
 (0)