...

/

Solution Review: Problem Challenge 1

Solution Review: Problem Challenge 1

Tree Diameter (medium) #

Given a binary tree, find the length of its diameter. The diameter of a tree is the number of nodes on the longest path between any two leaf nodes. The diameter of a tree may or may not pass through the root.

Note: You can always assume that there are at least two leaf nodes in the given tree.

Solution #

This problem follows the ...