Core idea: Construct the De Bruijn graph and find an Euler circuit.
Graph construction:
- vertices (each is an -bit string)
- edges (each is an -bit string)
- Edge from vertex to vertex if 's last bits equal 's first bits
Why Euler circuit exists: Each vertex has in-degree out-degree (can append or ).
The Euler circuit visits all edges, giving all -bit strings.