Mid From PDF GoF Patterns Gang of Four Patterns

Encapsulation of Collection Structure:?

Short answer: The Iterator Pattern allows the collection’s internal structure to be hidden from the client. The client interacts only with the iterator, which means that changes to the underlying collection (e.g., changing it from a list to a linked list) do not affect the client code.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details