What are the categories of design patterns?

Design patterns fall into three categories: creational, structural, and behavioral. That grouping comes from the Gang of Four book. It cataloged 23 patterns and sorted them by the problem each one solves. Creational patterns deal with how objects get made. Structural patterns deal with how objects are composed. Behavioral patterns deal with how objects talk to each other. Many teams add a fourth category, concurrency, for patterns that coordinate work across threads.

Quick Overview

CategoryThe problem it solvesPatterns you should know
CreationalMaking objects without hard-coding the classFactory Method, Abstract Factory, Builder, Singleton
StructuralComposing objects into larger structuresAdapter, Decorator, Facade, Proxy, Composite
BehavioralAssigning responsibility and communicationStrategy, Observer, Command, State, Template Method
ConcurrencyCoordinating work across threadsProducer-Consumer, Thread Pool, Read-Write Lock

Creational patterns

These control how objects are created. The goal is that code asking for an object does not need to know which concrete class it gets.

Factory Method puts object creation behind a method that subclasses override. Abstract Factory does the same for a whole family of related objects. Builder assembles an object step by step. That helps when a constructor would otherwise take ten arguments. Singleton restricts a class to one instance.

Singleton is the one to be careful with. It is the most recognized pattern and the most criticized. A single global instance makes code hard to test.

Structural patterns

These describe how to compose objects into bigger structures without a rigid inheritance tree.

Adapter wraps a class so it matches an interface your code already expects. Decorator wraps an object to add behavior without changing the original class. Facade puts one simple interface in front of a complicated subsystem. Proxy stands in for another object and controls access to it. Composite lets you treat a single object and a whole tree the same way.

If you have ever wrapped a third-party client so the rest of your code does not depend on it, you have written an Adapter.

Behavioral patterns

These deal with responsibility: which object does what, and how they communicate.

Strategy makes an algorithm swappable at runtime. Observer lets objects subscribe to events on another object. That is the idea behind most event systems. Command turns a request into an object. It can then be queued, logged, or undone. State lets an object change behavior when its internal state changes. Template Method defines the skeleton of an algorithm and leaves specific steps to subclasses.

Strategy and Observer come up more than any other pattern in interviews. Know both well enough to write one.

The fourth category: concurrency patterns

Concurrency patterns are not in the Gang of Four book. They were cataloged later. They solve a different problem: coordinating work safely across threads.

Producer-Consumer separates code that creates work from code that processes it. A queue sits in between. Thread Pool reuses a fixed set of threads instead of creating one per task. Read-Write Lock lets many readers proceed together but gives writers exclusive access.

You will see design patterns described as three categories in some sources and four in others. Both are correct. Three is the Gang of Four classification. The fourth is a later addition that most teams treat as standard.

Which ones actually come up in interviews

You do not need all 23. In an object-oriented design round, a small set does most of the work.

  • Strategy, when the question asks you to make behavior swappable
  • Observer, when one change has to notify several parts of the system
  • Factory, when object creation would otherwise be scattered across the code
  • Adapter, when two interfaces do not match
  • Decorator, when features stack in combinations

The mistake to avoid is naming a pattern you cannot implement. Interviewers follow up by asking you to write it. A pattern name without working code scores worse than saying nothing.

How to Prepare

Learn the five patterns above properly before the rest. Being able to write Strategy and Observer from memory is worth more than recognizing all 23.

Practice applying them, not reciting them. In object-oriented design questions they are a solution you reach for, not a definition you state.

For database work, the patterns are different. Schema and data-layer patterns are a separate topic from the Gang of Four set. See database design patterns.

For distributed systems, so are the patterns. System design rounds use patterns like circuit breaker and sharding. See key system design patterns for tech interviews and, for service architecture, essential microservices patterns.

For a full treatment of the object-oriented set, Grokking Design Patterns for Engineers and Managers works through each pattern with code. For the distributed systems set, see Grokking the System Design Patterns.

TAGS
System Design Interview
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.
-

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
How many rounds are in an Amazon interview?
What is low level system design?
How do I change the author and committer name/email for multiple commits?
What Is the Anthropic Interview Process Like? (Round by Round)
A round-by-round breakdown of Anthropic's interview process for engineers: the 'Why Anthropic?' application question, recruiter screen, technical assessments, the virtual onsite loop, values fit, timeline, and the official rules on using Claude or other AI during interviews.
What Is Blue/Green Deployment in Kubernetes?
Learn what blue/green deployment in Kubernetes is, when to use it, key trade-offs, interview tips, and common pitfalls. Perfect for system design and coding interview prep.
What are the top system design interview questions for Datadog interview?
Related Courses
New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$123

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Grokking Modern AI Fundamentals course cover
Grokking Modern AI Fundamentals
Master the fundamentals of AI today to lead the tech revolution of tomorrow.
4.1
Discounted price for Your Region

$72

Design Gurus logo
One-Stop Portal For Tech Interviews.
Copyright © 2026 Design Gurus, LLC. All rights reserved.