Practice: Garbage Collection
Q21. Tree with parent links
A tree node stores its children list and a link to its parent. How can you avoid a reference cycle?
Goal: Design without cycles.
A tree node stores its children list and a link to its parent. How can you avoid a reference cycle?
Goal: Design without cycles.