Problem Challenge 1
We'll cover the following
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.
Try it yourself #
Try solving this question here: