Exercises Videos Notes Multiple-choice questions

Related books

Algorithms Algorithm Design Graph Coloring Problems Matching Theory Modern Graph Theory Chromatic Graph Theory Graph Theory Algorithms Suggest a Book
1

Diameter of a tree

Level: unknown
 

posted Jul 10 '12

kintali gravatar image Shiva Kintali flag of United States
691 1 6 22
http://www.cs.princeton.e...

Let $T(V, E)$ be a tree given as an adjacency list. For vertices $u, v \in V$, let $d(u, v)$ denote the length of the path from $u$ to $v$ in $T$. Give a linear-time algorithm to determine the value $max_{u,v \in V} d(u, v)$.

Source: folklore
Printable version LaTeX source
delete flag offensive retag edit

Stats

Posted: Jul 10 '12

Seen: 65 times

Last updated: Jul 11 '12