Find the Longest Path of Equal-Valued Tree Nodes

Quick Overview

Find the longest path of equal-valued nodes in a binary tree encoded as a breadth-first list. Clarify the ambiguity with strict BST terminology, then compute both one-sided and through-node paths in linear time without unsafe recursion.

Find the Longest Path of Equal-Valued Tree Nodes

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Find the longest path of equal-valued nodes in a binary tree encoded as a breadth-first list. Clarify the ambiguity with strict BST terminology, then compute both one-sided and through-node paths in linear time without unsafe recursion.

|Home/Coding & Algorithms/Google
Google logo
Google
Jun 11, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
5
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...