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.