【python/M/leetcode】Gray Code

题目 思路 这个题涉及到格雷码,若是你从没了解过格雷码,请戳这里。 我用到的方法也是最简单的二进制码和二进制格雷码转换。 python 实现代码 class Solution: def grayCode(self, n): """ :type n: int :rtype: List[int] """ resultCodeList = [] f
相关文章
相关标签/搜索