A DeBruijnSequence of order $n$ on a list of length $k$ is a cyclic sequence of length in which every possible block of length $n$ taken from the list occurs exactly once as a contiguous subsequence.
What algorithm(s) does DeBruijnSequence use? Why does this function run so fast even for large parameters?
Below links may help:
GeneralUtilities`PrintDefinitions[DeBruijnSequence], and you will se the code behind. $\endgroup$Language`NumbersDump`deBruijnSequencePositionswhich is actually a rather simpleCompiledFunctionthat you can inspect. It appears to just be the came as the C++ implementation from Rosetta Code $\endgroup$