Back to the Problem
The i-th Gray code is i ⊕ (i >> 1); format each with leading zeros.
Complexity: O(2N · N)