Dan Luu personal blog
Why does Sattolo's algorithm produce a permutation with exactly one cycle?
I recently had a problem where part of the solution was to do a series of pointer accesses that would walk around a chunk of memory in pseudo-random order. Sattolo's algorithm provides a solution to this because it produces a permutation of a list with exactly one cycle, which guarantees that we will reach every…
- Points
- 156
- HN comments
- 38
- Submissions
- 2
- Cited by
- 0 commenters
Math & AlgorithmsSoftware Engineering2017
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Aug 9, 2017 | Why does Sattolo's algorithm produce a permutation with exactly one cycle? by darwhy | 156 | 18 |
| Sep 15, 2020 | Sattolo's Algorithm (2017) by laybak | 100 | 20 |