Tag Archives: graycode

Gray code

The original problem is from leetcode: https://leetcode.com/problems/gray-code/ And I found a very good solution from Wolfram: The code is called reflected because it can be generated in the following manner. Take the Gray code 0, 1. Write it forwards, then backwards: 0, 1, 1, 0. Then prepend 0s to the first half and 1s to… Read More »