Consider the following algorithm someAlgo that takes an undirected graph as input. someAlgo (G)
- Let be any vertex in . Run BFS on starting at . Let be a vertex in at maximum distance from as given by the BFS.
- Run BFS on again with as the starting vertex. Let be the vertex at maximum distance from as given by the BFS.
- Output the distance between and in .
The output of someAlgo ( ) for the tree shown in the given figure is ___________. (Answer in integer)

View answer
Answer: 6:6
Worked explanation not available yet.
Free practice · Your answers on this page are not saved.
