Design LeetCode Problems: All 122,
With Python Solutions

Every problem in this library that LeetCode tags Design. 89 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.

Easy
13
Medium
79
Hard
30

Design problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (13)

Easy problems
No.Problem
0225Implement Stack using Queues
0232Implement Queue using Stacks
0303Range Sum Query - Immutable
0703Kth Largest Element in a Stream
0705Design HashSet
0706Design HashMap
0933Number of Recent Calls
1603Design Parking System
1656Design an Ordered Stream
0170Two Sum III - Data structure designPremium
0346Moving Average from Data StreamPremium
0359Logger Rate LimiterPremium
0604Design Compressed String IteratorPremium

Medium (79)

Medium problems
No.Problem
0146LRU Cache
0155Min Stack
0173Binary Search Tree Iterator
0208Implement Trie (Prefix Tree)
0211Design Add and Search Words Data Structure
0284Peeking Iterator
0304Range Sum Query 2D - Immutable
0307Range Sum Query - Mutable
0341Flatten Nested List Iterator
0355Design Twitter
0380Insert Delete GetRandom O(1)
0384Shuffle an Array
0449Serialize and Deserialize BST
0535Encode and Decode TinyURL
0622Design Circular Queue
0641Design Circular Deque
0676Implement Magic Dictionary
0677Map Sum Pairs
0707Design Linked List
0729My Calendar I
0731My Calendar II
0855Exam Room
0900RLE Iterator
0901Online Stock Span
0911Online Election
0919Complete Binary Tree Inserter
0981Time Based Key-Value Store
1146Snapshot Array
1261Find Elements in a Contaminated Binary Tree
1286Iterator for Combination
1348Tweet Counts Per Frequency
1352Product of the Last K Numbers
1357Apply Discount Every n Orders
1381Design a Stack With Increment Operation
1396Design Underground System
1472Design Browser History
1476Subrectangle Queries
1600Throne Inheritance
1670Design Front Middle Back Queue
1797Design Authentication Manager
1845Seat Reservation Manager
1865Finding Pairs With a Certain Sum
1993Operations on Tree
2013Detect Squares
2034Stock Price Fluctuation
2043Simple Bank System
2080Range Frequency Queries
2166Design Bitset
2241Design an ATM Machine
2336Smallest Number in Infinite Set
2349Design a Number Container System
2353Design a Food Rating System
2424Longest Uploaded Prefix
2502Design Memory Allocator
2526Find Consecutive Integers from a Data Stream
2671Frequency Tracker
0244Shortest Word Distance IIPremium
0251Flatten 2D VectorPremium
0271Encode and Decode StringsPremium
0281Zigzag IteratorPremium
0288Unique Word AbbreviationPremium
0308Range Sum Query 2D - MutablePremium
0348Design Tic-Tac-ToePremium
0353Design Snake GamePremium
0362Design Hit CounterPremium
0379Design Phone DirectoryPremium
0635Design Log Storage SystemPremium
1166Design File SystemPremium
1244Design A LeaderboardPremium
1429First Unique NumberPremium
1500Design a File Sharing SystemPremium
1570Dot Product of Two Sparse VectorsPremium
1586Binary Search Tree Iterator IIPremium
1628Design an Expression Tree With Evaluate FunctionPremium
1756Design Most Recently Used QueuePremium
1804Implement Trie II (Prefix Tree)Premium
2069Walking Robot Simulation II
2408Design SQLPremium
2590Design a Todo ListPremium

Hard (30)

Hard problems
No.Problem
0295Find Median from Data Stream
0297Serialize and Deserialize Binary Tree
0352Data Stream as Disjoint Intervals
0381Insert Delete GetRandom O(1) - Duplicates allowed
0432All O`one Data Structure
0460LFU Cache
0715Range Module
0732My Calendar III
0745Prefix and Suffix Search
0895Maximum Frequency Stack
1032Stream of Characters
1157Online Majority Element In Subarray
1172Dinner Plate Stacks
1206Design Skiplist
1483Kth Ancestor of a Tree Node
1622Fancy Sequence
1825Finding MK Average
1912Design Movie Rental System
2102Sequentially Ordinal Rank Tracker
2227Encrypt and Decrypt Strings
2276Count Integers in Intervals
2286Booking Concert Tickets in Groups
2296Design a Text Editor
2642Design Graph With Shortest Path Calculator
0431Encode N-ary Tree to Binary TreePremium
0588Design In-Memory File SystemPremium
0631Design Excel Sum FormulaPremium
0642Design Search Autocomplete SystemPremium
0716Max StackPremium
2254Design Video Sharing PlatformPremium

Eyes only

When the Design problem arrives live.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.