dsalgo 0.3.10

A package for Datastructures and Algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::tree_diameter_path_unweighted::diameter_path;

pub fn diameter_ends(g: &[Vec<usize>]) -> (usize, usize) {
    let path = diameter_path(g);

    (path[0], *path.last().unwrap())
}

#[cfg(test)]

mod tests {

    #[test]

    fn test() {}
}