5 ms·
The Wikipedia article doesn't mention this, but the de Bruijn sequence can be computed greedily. Start with 000...0, keep appending the largest digit possible
by murbard2 11y ago
The Wikipedia article doesn't mention this, but the de Bruijn sequence can be computed greedily.
Start with 000...0, keep appending the largest digit possible that doesn't produce a code that's already been used and you'll go through all the codes.