Skip to main content
General

Design Patterns every developer should know

Marco JacksonMarco Jackson
9 months ago
274

For machine coding rounds and LLD interviews, these patterns come up most:

  1. Strategy Pattern - Different algorithms interchangeable at runtime
  2. Observer Pattern - Event-driven systems, pub/sub
  3. Factory Pattern - Object creation without specifying exact class
  4. Singleton Pattern - Single instance (controversial but commonly asked)
  5. Builder Pattern - Complex object construction
  6. Adapter Pattern - Making incompatible interfaces work together

I'd say Strategy, Observer, and Factory cover 80% of LLD interview scenarios.

Which patterns do you use most in real work?


design-patternslldinterview-prepoop

Comments (4)

Sign in to join the discussion.
Sachin Ahuja
Sachin Ahuja8 months ago

I see Adapter and Strategy Pattern being used a lot in legacy systems we work on. They really help when integrating new components with old code.

Tushar Gupta
Tushar Gupta8 months ago

The Singleton Pattern being controversial is spot on. I’ve had discussions where folks call it an anti-pattern. I guess it depends on the use case though. Anyone has thoughts on when it’s actually beneficial?

Vera Chen
Vera Chen8 months ago

I’d love to hear more about real-world Observer Pattern use cases. We use it for our notification system, but I wonder if I'm missing other potential applications.

Madhav Mukherjee
Madhav Mukherjee9 months ago

Nice summary, Marco! I'm curious about the Builder Pattern though. Is it really necessary when we have telescopic constructors?