Binary Tree Longest Consecutive Sequence II
CodingOnsiteSoftware EngineerReported Feb, 2026
Company question banks are included with the Insider plan.
Given the root of a binary tree, return the length of the longest consecutive path in the tree.
A consecutive path is a path where the values of adjacent nodes differ by one. This path can be either...