Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It looks like there's no upper bound for
n
dependent on the sequence length. In this case solutions like this can crash with out-out-range item access at largen
s. Either tests with largen
s or the upper bound forn
should be added. (There are no such tests at least in Rust.)Haskell translation
Please note I have updated the description: use double quotes for strings because Haskell reserves single quotes for single characters, moved the section explaining de Bruijn sequences up top, and minor updates to spelling, grammar and markup. If you disagree with any change, it can be changed again.