Leetcode 1506. Find Root of N-Ary Tree
Given an unordered list of all nodes of an N-ary tree (nodes have children pointers but no parent pointers), identify the root — the single node that never appears as any node's child — in linear time (e.g., by set difference or XOR of values).
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid May, 2026
Senior
Given adjacency list representation of a binary tree, find the root node
Hello Interview Premium
Your account is free and you can post anonymously if you choose.