Find the longest consecutive increasing path in a binary tree.
Unlock detailed company stats for this questionUpgrade
The path must go from parent to child, and the node values must be continuously increasing. Solved with DFS, tracking the current consecutive length and a global maximum. Follow-up: how would you modify the solution if the path could go in any direction?
Expect follow-ups like
- How would you modify the solution if the path could go in any direction?
Community answers
No answers contributed by the community yet.


