Anonymous user
Sorting algorithms/Bogosort: Difference between revisions
→{{header|Rust}}: Shuffling is required so long as the list is NOT sorted.
(→{{header|Rust}}: Shuffling is required so long as the list is NOT sorted.) |
|||
Line 2,357:
{
let mut rng = rand::thread_rng();
while !is_sorted_by(&order, coll) {
rng.shuffle(coll);
}
|