Task H3.5: Google interview question 14 points The diameter of a graph G = (V, E) is given by the maximum distance D :=
Posted: Mon May 23, 2022 11:52 am
question 14 points The diameter of a graph G = (V, E) is given by the maximum distance D := maxvev d(u, v) between any pair of vertices, where d(u, v) is the number of edges on a shortest path from u to v. Describe an algorithm that determines the diameter of a given tree T' in linear time. Use pseudocode to describe your algorithm. Prove correctness of your algorithm and show its running time.
Task H3.5: Google interview