Solutions of Tree diameter - MarisaOJ: Marisa Online Judge

Solutions of Tree diameter

Select solution language

Write solution here.


P3t3r    Created at    3 likes

Use BFS from any node to find the maximum distance from that node Then from the node we got the maximum distance, we use BFS to find the maximum distance from that node In conclusion we use 2 BFS