← Google questions
CodingReported in a candidate post, Mar 2025

Find root for valid alternating binary tree

Filed under Google

Given an undirected acyclic graph where each node has at most 3 edges and is colored Black or White, find a root node such that it forms a valid binary tree and exhibits an alternating color pattern…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.