Given a tree, you need to select a leaf and remove it. You can select any leaf if there are multiple leaves. Repeat this process until all the nodes are removed.
Return the removal sequence. Only one removal sequence is needed.
- if a leaf is removed and its parent becomes a new leaf, then the new leaf must NOT be removed for the next removal unless there is no other choice.
- Nodes need to be deleted from memory.