โ† Deloitte questions
CodingHard

Diameter of a generic tree/graph

Filed under Deloitte

Find the diameter of a generic tree or graph, defined as the length of the longest path between any two nodes in the tree.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Deloitte questions

Collected from public candidate posts and coding forums. Updated Nov 2026.