Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antalsz/functional-shuffle

Functional list shuffling with Heinrich Apfelmus's “merge shuffle” algorithm
https://github.com/antalsz/functional-shuffle

Last synced: about 1 month ago
JSON representation

Functional list shuffling with Heinrich Apfelmus's “merge shuffle” algorithm

Awesome Lists containing this project

README

        

# functional-shuffle

This package implements Heinrich Apfelmus’s “merge shuffle” algorithm from his
blog post [Random Permutations and Sorting].

This version of the algorithm produces a uniform shuffle of the list with a
single traversal.

[Random Permutations and Sorting]: https://apfelmus.nfshost.com/articles/random-permutations.html