Tree: Depth-First Search - Diameter of Binary Tree
Suppose the binary tree nodes can have negative values and you want to find the diameter defined as the longest path in terms of sum of node values (not edges). Which approach best adapts to this variant?
