pub fn oj_sort<T: PartialOrd>(a: &mut [T])
Expand description
wiki | Slightly specialized heapsort Heapsort optimized for small sets like poker hands, and in descending order which is most useful for ranking and displaying poker hands.
use onejoker::prelude::*;
use onejoker::utils::oj_sort;
let mut v = [7,1,5,10,2,3,9,4,6,8];
oj_sort(&mut v);
assert_eq!(v[0], 10);