pub fn heapsort<T, F>(v: &mut [T], is_less: &mut F) where F: FnMut(&T, &T) -> bool,
Sorts v using heapsort, which guarantees O(n log n) worst-case.
v
O(n log n)