Search
⌘K

Leetcode 608. Tree Node

Given a table of node ids and parent ids forming a valid tree, classify each node as "Root" (p_id is null), "Leaf" (no children, i.e., id never appears as a p_id) or "Inner" (has a parent and at least one child).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.