OOP & Design Patterns - Iterator & Composite Pattern - Traversal Abstractions
You need to traverse a tree-like structure where each node can be either a single element or a composite containing multiple child elements. The traversal should allow clients to iterate over all elements uniformly without exposing the internal structure. Which design approach best fits this requirement?
