Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Rao-Sandelius Shuffle

Sorting Algorithm

The Rao-Sandelius shuffle is a divide-and-conquer algorithm for randomly shuffling a finite sequence, described by C. Radhakrishna Rao in 1961 and refined for efficiency by Martin Sandelius in 1962. Each element is assigned a random value, the sequence is partitioned into subsequences according to those values, and each subsequence is then shuffled recursively in the same way. Although it uses more swaps than the Fisher-Yates shuffle for the same input, its memory access pattern has better cache locality and is easier to parallelize, so for very large sequences, such as around a billion items, it can outperform Fisher-Yates in practice. This description is adapted from Wikipedia contributors under CC BY-SA 4.0; changes were made. https://creativecommons.org/licenses/by-sa/4.0/

Facts
Time Complexity
Time Complexity (category)
Linearithmic Time -- O(n log n) 1
Classification
Design Technique
Divide and Conquer 1
Sources
1. Wikipedia: Rao-Sandelius shuffle
entity record, description (design-technique)
Quote, entity record, description (design-technique)
The Rao-Sandelius shuffle is a divide-and-conquer algorithm for randomly shuffling a finite sequence, described by C.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.