โ† Accolite questions
CodingReported in a candidate post, Aug 2020

Find the height and diameter of the tree

Filed under Accolite

Given the root of a binary tree, return both its height (number of edges on the longest path from root to leaf) and its diameter (number of edges on the longest path between any two nodes).

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 Accolite questions

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