Gray Code Posted on 2018-09-02 Descriptionhttps://leetcode.com/problems/gray-code/description/ Solution12345678910111213141516class Solution: def grayCode(self, n): """ :type n: int :rtype: List[int] """ if n == 0: return [0] array = self.grayCode(n - 1) symetric = [] for i in range(len(array)): symetric.append(array[i]) for j in range(len(array)): symetric.append(array[len(array) - j - 1] + (1 << (n - 1)) ) return symetric