InterviewDB
Question
Royal Succession: Determine the Order of Succession in a Family Tree After Removing Deceased Members
phone
Question Details
Problem You are given a royal family tree. Succession follows pre-order traversal (depth-first, left-to-right). Implement two methods: birth(parent, child) -- add a child to a parent. death(name) -- mark a person as deceased. order() -> list[str] --…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Onsite
Phone