OOP & Design Patterns - Iterator & Composite Pattern - Traversal Abstractions
You have a tree structure where each node can be either a single element or a composite containing multiple children. You want to traverse all elements uniformly without exposing the internal structure of the tree. Which design pattern best suits this requirement?
