DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Andrew Kensler's permute()

Quality: 8/10 Relevance: 9/10

Summary

This article explains Andrew Kensler's permute(), a stateless, constant-time pseudorandom-order array iterator. It covers the problem it solves, the underlying cycle-walking invertible-hash approach, and practical optimizations, contrasting with Fisher-Yates and incremental sampling. It provides code snippets and a final implementation for generating random, unique indices efficiently.

🚀 Service construit par Johan Denoyer