Uber logoUber
CodingMembers

Binary Tree Longest Consecutive Sequence II

Members only

Given the root of a binary tree, return the length of the longest consecutive path, where adjacent node values differ by one. The path may be increasing or decreasing and can pass through a node in th...

SWE
tree
dfs
tree-traversal
recursion
medium
Frequency
Single report
Last asked
2026-01-11
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...