Iterator Pattern

The Iterator Pattern is a behavioral design pattern that provides a way to access elements of a collection sequentially without exposing its underlying representation. This pattern is particularly useful for traversing complex data structures in a consistent and flexible manner.