Skip to main content
Back to Topics

Design Problems (132)

Problems tagged with Design

About Design

Design problems in Data Structures and Algorithms test your ability to build efficient, reusable systems using fundamental data structures. Instead of solving a single computation task, these problems require you to design a class or data structure that supports multiple operations efficiently. Examples include building an LRU cache, implementing a hit counter, designing a data stream tracker, or creating a custom iterator.

These questions are extremely common in technical interviews because they evaluate how well you combine multiple concepts. A typical Design problem might require you to integrate structures like a Hash Table for constant-time lookups, a Linked List for maintaining order, or a Heap (Priority Queue) to manage priorities efficiently. Many designs also rely on structural concepts from Tree data structures or search techniques like Binary Search.

Why Design problems matter in interviews:

  • They test your ability to combine multiple data structures.
  • They reveal whether you can optimize operations such as insert, delete, and lookup.
  • They evaluate object-oriented thinking and API design.
  • They simulate real-world engineering problems such as caching, queues, and streaming data.

Common Design interview questions include building an LRU/LFU cache, implementing a min stack, designing a browser history system, or creating a time-based key-value store. These problems often require careful trade-offs between time complexity and memory usage. Interviewers typically expect solutions with optimal complexities like O(1) or O(log n) for core operations.

The best way to master this topic is by recognizing recurring patterns. Many problems reuse similar ideas—combining hash maps with linked structures, managing state through queues or stacks, or maintaining sorted elements with heaps or trees. Once you understand these patterns, solving new Design problems becomes much faster.

FleetCode provides 131 Design practice problems with detailed explanations and complexity analysis, helping you build the intuition needed to confidently handle design-style coding interview questions.

Prerequisites

1
Queue

Queues help manage ordered events, streams, or sliding windows in design problems like hit counters or rate limiters.

2
Hash Table

Many design problems rely on O(1) key lookups. Hash tables are commonly combined with other structures to maintain fast access while tracking additional state.

3
Linked List

Used to maintain ordering in structures like LRU caches and browser history. Understanding node manipulation and pointer updates is essential for many design tasks.

4
Heap (Priority Queue)

Important for designs that require retrieving minimum or maximum elements efficiently, such as scheduling systems or frequency tracking structures.

#146

LRU Cache

Medium✓ Solution📹 Video
Accenture+119
#155

Min Stack

Mediumâś“ Solution
Adobe+36
#225

Implement Stack using Queues

Easy✓ Solution📹 Video
Amazon+8
#232

Implement Queue using Stacks

Easy✓ Solution📹 Video
Amazon+11
#244Premium

Shortest Word Distance II

Medium✓ Solution📹 Video
Anduril+3
#251Premium

Flatten 2D Vector

Medium✓ Solution📹 Video
Airbnb+3
#281Premium

Zigzag Iterator

Medium✓ Solution📹 Video
Amazon+4
#304

Range Sum Query 2D - Immutable

Medium✓ Solution📹 Video
Amazon+9
#348Premium

Design Tic-Tac-Toe

Medium✓ Solution📹 Video
Airbnb+12
#353Premium

Design Snake Game

Medium✓ Solution📹 Video
Amazon+9
#362Premium

Design Hit Counter

Medium✓ Solution📹 Video
Affirm+24
#379Premium

Design Phone Directory

Medium✓ Solution📹 Video
Google
#380

Insert Delete GetRandom O(1)

Medium✓ Solution📹 Video
Affirm+37
#384

Shuffle an Array

Medium✓ Solution📹 Video
Amazon+7
#631Premium

Design Excel Sum Formula

Hard✓ Solution📹 Video
Airbnb+8
#641

Design Circular Deque

Medium✓ Solution📹 Video
Amazon+4
#677

Map Sum Pairs

Mediumâś“ Solution
Akuna Capital+2
#705

Design HashSet

Easy✓ Solution📹 Video
Amazon+5
#706

Design HashMap

Easy✓ Solution📹 Video
Amazon+12
Page 1 of 3

Practice by Difficulty

Start Easy, progress to Hard.

FAQ

Common questions about Design.

What are Design problems in DSA?

Design problems require you to implement a data structure or class that supports multiple operations efficiently. Instead of solving a single algorithmic task, you build a reusable system such as an LRU cache, min stack, or time-based key-value store.

What is the best way to learn Design problems?

Start by mastering core data structures like hash tables, linked lists, heaps, and queues. Then practice classic designs such as LRU Cache and Min Stack before moving to more complex systems like streaming counters and social feed designs.

What patterns are common in Design DSA problems?

Common patterns include combining a hash map with a doubly linked list for O(1) operations, using heaps for priority-based retrieval, maintaining state with queues or stacks, and using balanced trees for ordered data access.

Is Design an important topic for FAANG interviews?

Yes. Companies like Google, Amazon, and Meta frequently ask Design-style coding questions because they simulate real engineering tasks. These questions test both algorithmic thinking and data structure integration.

What are the best Design problems for coding interviews?

Popular interview questions include LRU Cache, LFU Cache, Min Stack, Design Twitter, Design Hit Counter, and Time-Based Key-Value Store. These problems test how well you combine data structures like hash maps, linked lists, and heaps.

How many Design problems should I practice for interviews?

Most candidates benefit from solving 30–60 well-chosen Design problems. This is usually enough to understand common patterns like hash map + linked list combinations or priority-based structures.