class Solution: # @return a list of integers def grayCode(self, n): return [i^(i>>1) for i in range(1<<n)]
No comments :
Post a Comment