Search
⌘K

Leetcode 1600. Throne Inheritance

Maintain an evolving rooted family tree (king as root) that supports adding a child and marking a person dead, and return the current inheritance order defined by a preorder (DFS) traversal that lists each person before their children in birth order, skipping deceased members. The core challenge is efficiently handling online updates and queries where the inheritance order follows this fixed traversal rule.

Asked at:

Apple


Question Timeline

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

Early May, 2026

Apple

Mid-level

Given a list of people, with birth and death dates, who are decedents of a monarch, print the current line of succession

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