3 ms·
They're called De Bruijn sequences[1], and there's an algorithm for constructing them. I'm not sure how easy it is to run in your head, though. [1] https://en.
by justinpombrio 10y ago
They're called De Bruijn sequences[1], and there's an algorithm for constructing them. I'm not sure how easy it is to run in your head, though.
[1] https://en.wikipedia.org/wiki/De_Bruijn_sequence#Algorithm https://en.wikipedia.org/wiki/De_Bruijn_sequence#Algorithm