Given a binary tree, find the diameter: the longest path between any two nodes. The path does not have to pass through the root.
This problem is a direct application of Tree DP. You compute height for each subtree and track the longest path that bends through each node. You will solve this problem fully in the Tree Diameter & Center section, where you will compare the DP approach with a Double BFS approach.