← Google questions
CodingReported in a candidate post, Aug 2024

Ancestral tree sibling and LCA queries

Filed under Google

Given an infinite tree where each node has two parents, determine if two nodes are siblings, first cousins, or find their Lowest Common Ancestor (LCA).

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.