pub fn make_freq<T: Ord + Clone>(x: &[T], freq: &mut Vec<(u32, T)>)