Longest path with same values in a binary tree
Filed under Curefit
The question
Find the length of the longest path in a binary tree where every node in the path has the same value. The path does not need to pass through the root.
No write-up yet. Related questions below have one.
Related Curefit questions
Collected from public candidate posts and coding forums. Updated Nov 2026.