Register
|
Login
HOME
PROBLEMSET
ROADMAP
COMPETITION
TOPIC
RANKING
GUIDE
MASHUP
ABOUT
CONTACT
Solutions of Tree diameter - MarisaOJ: Marisa Online Judge
Solutions of
Tree diameter
Select solution language
All
Tiếng Việt
English
Other
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