OOP & Design Patterns - Iterator & Composite Pattern - Traversal Abstractions
If the Composite pattern iterator is extended to allow reusing leaf components multiple times during traversal (e.g., shared leaves), which modification is necessary to ensure correct iteration without infinite loops?
