Function stats::mode

source ·
pub fn mode<T, I>(it: I) -> Option<T>where
    T: PartialOrd + Clone,
    I: Iterator<Item = T>,
Expand description

Compute the exact mode on a stream of data.

(This has time complexity O(nlogn) and space complexity O(n).)

If the data does not have a mode, then None is returned.