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