pub fn bogosort<T: PartialOrd>(input: &mut [T])
Expand description

Sorts the given list using the bogosort algorithm.

Examples

use badsort::bogosort;
 
let mut arr = vec![4, 5, 2, 1, 3];
 
bogosort(&mut arr);

assert_eq!(arr[0], 1);