Thoughts on computer programming and related topics.
See the Git repository.
Copyright © 2015–2025 Bernardo Sulzbach
I have written about algorithms that generate permutations.
There is this blog post about Heap’s algorithm.
There is also this post about another algorithm.
Lastly, if you need pseudorandom permutations, you can use Fisher-Yates shuffling.