Skip to main content

kahn

Function kahn 

Source
fn kahn<K: Ord>(
    n: usize,
    edges: &[Vec<usize>],
    open: &[bool],
    key: impl Fn(usize) -> K,
) -> Vec<usize>
Expand description

Kahn’s algorithm over the open tasks, the smallest key first among those free.