Function approx_pearson_skew::median [−][src]
pub fn median(slice: &[u8]) -> Option<f32>
Find median from unsorted immutable slice
Using a O(1) size, but O(nk) time method, worst case O(n^2) time.
let arr = [1, 2, 6, 7, 6, 1]; let med = median(&arr).unwrap(); assert_eq!(med, 4.0);