โ† Microsoft questions

Check if binary tree nodes are directly connected

Filed under Microsoft

Given a binary tree and a list of target nodes, determine if all nodes in the list are directly connected to each other, meaning they form a single path or a parent-child relationship chain.

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 Microsoft questions

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