Snowflake logoSnowflake
CodingMembers

Longest Univalue Path

Members only

Given the root of a binary tree, return the length of the longest path where each node in the path has the same value.

SWE
tree
dfs
recursion
medium
Frequency
Single report
Last asked
2025-12-23
Stage
phone-screen · onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...