Question You are tasked with implementing a Bootstrap API that aggregates data from multiple services for a given user. Given a userId, you...
Input: String Output: Computed result
codingHardVerified Question#2
2. Code Craft - Driver Payment System
Category: Algorithm coding problem
Question You are in charge of implementing the Dasher payment model. Given the sequence of accepted/fulfilled order activities from a given dasher...
Input: List Output: Computed result
codingMediumVerified Question#3
3. Find Closest Dasher
Category: Algorithm coding problem
Question You are given an m × n board representing a delivery area. The board contains: - 'X' - blockers (obstacles) - 'D' - DashMarts...
Input: List Output: Integer
codingMediumVerified Question#4
4. Find Menu Changes
Category: Tree coding problem
Question You are given two tree structures representing an old menu and a new menu. Each tree node has: - key: identifier for the menu...
Input: List Output: Computed result
codingMediumVerified Question#5
5. Location Index
Category: Graph coding problemImplement a LocationIndex class that stores a set of named points on a 2D grid. The constructor takes three arrays: names (list of location name...Input: 2D grid Output: Computed result
codingMediumVerified Question#6
6. Covered Service Zones
Category: Algorithm coding problemYou are given two binary m x n matrices: coverage and demand. A cell in demand is active if its value is 1. Active cells that are...Input: Number(s) Output: Integer
codingHardVerified Question#7
7. Wildcard Segment Counter
Category: String coding problemYou are given a template string consisting only of the characters '0', '1', and '?', and a list of integers run_lengths. A '?' in the...Input: Array of integers Output: Computed result
codingMediumVerified Question#8
8. Peak Value Processing Order
Category: Algorithm coding problemYou are given a list of unique integers values. At each step, identify all eligible values: a value is eligible if it is strictly greater than...Input: List Output: Computed result
codingHardVerified Question#9
9. Directory Registry
Category: Tree coding problemImplement a DirectoryRegistry class that manages a hierarchical key-value store modeled as a tree of paths. The root path "/" always exists with...Input: String Output: Computed result
codingHardVerified Question#10
10. Ride Earnings Calculator
Category: String coding problemYou are given records, a list of ride events. Each record is a list of three strings: [ride_id, timestamp, status]. Possible statuses are...Input: List Output: Computed result
codingMediumVerified Question#11
11. Meeting Slot Generator
Category: Interval-based coding problemGiven a start time and an end time, generate all meeting check-in slots at 5-minute intervals after start up to and including end. The...Input: List Output: Computed result
codingMediumVerified Question#12
12. Catalog Tree Diff Counter
Category: Tree coding problemYou are given two n-ary trees representing an old and a new version of a product catalog. Each node in the tree has the following fields: - key...Input: List Output: Computed result
system designHardVerified Question#13
13. Top 8 Doordash System Design Questions Jan 2026
Category: Linked list system design problem
System Design Questions - DoorDash These are the commonly asked system design questions from DoorDash interviews. Updated January 2026.
Input: Linked list Output: Computed result
codingMediumcaching#1
1. Caching System — Implement an LRU Cache
Background: DoorDash relies on caching to enhance the responsiveness of its application, especially for frequently accessed data such as restaurant menus and user order histories. An efficient caching mechanism like LRU (Least Recently Used) helps optimize resource usage and increase performance.Problem statement: Design and implement a class LRUCache that supports the following operations: get(key) and put(key, value). The get method retrieves the value associated with the key if it exists, and also marks that key as recently used. The put method stores or updates the value associated with a specific key. If the cache exceeds its capacity, it should evict the least recently used item.Function/class signature:
Output: -1 (Explanation: returns -1 since key 2 was evicted)
Constraints:
1 <= capacity <= 3000
0 <= key <= 10^4
0 <= value <= 10^4
get and put operations will be called at most 3 * 10^4 times in total.
codingMediumheap#2
2. Heap — Median of a Stream of Numbers
Background: In a real-time delivery service like DoorDash, understanding user preferences or delivery timeframes involves stream analysis, such as tracking customer ratings for their orders. This requires a mechanism to efficiently calculate the median of ratings as they come in over time. Problem statement: Implement a class MedianFinder that supports the addition of numbers and can return the median of all added numbers efficiently. Ensure that the implementation uses two heaps to keep track of the lower half and the upper half of the numbers. Function/class signature:
Explanation: The numbers are [1,2], and the median is (1 + 2) / 2 = 1.5.
Example 2:
Input:
medianFinder.addNum(3) medianFinder.findMedian()
Output:
2.0
Explanation: The numbers are [1, 2, 3], and the median is 2.
Constraints:
All input numbers are integers.
There will be at most 10000 calls to addNum and findMedian.
The input stream will be non-empty at the time of calls to findMedian.
codingMediumgreedy#3
3. Heuristic search algorithm — Implement a function to calculate optimal Dasher routes
Background: DoorDash relies on efficient routing to ensure that food is delivered quickly and accurately. A well-designed routing algorithm can significantly reduce delivery times and improve customer satisfaction. Problem statement: You need to implement a function that takes a list of delivery locations and computes the optimal route for Dashers, minimizing the total distance traveled. The function should use a simple heuristic to prioritize nearby deliveries first. Return the ordered list of delivery locations. Function/class signature:
Example 1: Input: [(1.0, 1.0), (2.0, 2.0), (3.0, 1.5)] Output: [(1.0, 1.0), (2.0, 2.0), (3.0, 1.5)] Explanation: The optimal path starts from the first location, goes to the second, and finally to the third. Example 2: Input: [(5.0, 5.0), (1.0, 1.0), (2.0, 2.0)] Output: [(1.0, 1.0), (2.0, 2.0), (5.0, 5.0)] Explanation: The optimal path starts from the closest location at (1.0, 1.0). Constraints:
1 <= len(locations) <= 100
Locations are given in (latitude, longitude) format
Coordinate values will be between -10^[6] and 10^[6]
codingMediumconcurrency#4
4. Concurrency — API to compute driver payouts with bonus multipliers
Background: DoorDash needs an efficient way to calculate driver payouts to ensure fair compensation for their services. This involves combining various bonus multipliers based on events like peak hours and completed deliveries. Problem statement: You need to design an API that computes the total payout for a driver based on their events. Consider events as a list of tuples where each tuple contains a timestamp and a payout amount. Implement concurrency to handle situations where multiple bonus multipliers may apply. Function/class signature:
Note: Handle concurrency issues when multiple threads may call this API to calculate payouts simultaneously.
codingMediumapi design#5
5. Coding Challenge — API for Driver Payout Calculation
Background: DoorDash needs to compute driver payouts based on various factors such as delivery events and concurrency-based bonus multipliers. This requires a reliable API that can efficiently handle and process these events to calculate accurate payouts. Problem statement: You are tasked with designing an API to compute driver payouts. Each driver can have multiple deliveries, and we need to calculate their total payout based on delivery events. Each event will have a base payout and may include bonuses based on concurrency rules. Implement the method compute_payout(driver_id: int, events: List[Tuple[int, float, int]]) -> float, which takes the driver's ID and a list of events where each event is a tuple containing:
event_time (int): The timestamp of the event in seconds.
base_payout (float): The base payout for the delivery.
bonus_multiplier (int): A bonus multiplier applied if certain conditions are met (e.g., if two deliveries are made within a specific time frame).
Explanation: The driver made two deliveries within the time frame eligible for bonuses, resulting in a total payout of $10 + $15 + (1 * 10) + (1 * 15) = $35.0.
Explanation: The driver made two deliveries without any bonus multiplier applied due to not meeting the concurrency condition.
Constraints:
1 ≤ driver_id ≤ 10000
0 ≤ event_time ≤ 10^6
0 ≤ base_payout ≤ 1000
1 ≤ bonus_multiplier ≤ 5
The length of events can be at most 1000.
codingMediumhash map#6
6. Hash Map — Count Unique Deliveries
Background: DoorDash needs to efficiently track the number of unique deliveries made by different drivers over a certain period to analyze performance metrics and optimize routing. This problem relates to the data management aspect of delivery logistics. Problem statement: Given a list of driver IDs and the corresponding delivery timestamps, implement a function to count the number of unique deliveries for each driver. You must ensure that each driver's unique deliveries are counted based on distinct timestamps. Assume the timestamps are in the format YYYY-MM-DD HH:MM:SS and each driver can have multiple deliveries at the same timestamp. Function/class signature:
Explanation: Driver C has two unique delivery times.
Constraints:
1 <= len(drivers) <= 10^4
1 <= len(timestamps) <= 10^4
Timestamps are unique across the drivers but may repeat for the same driver.
codingHardgraph#7
7. [OA] Depth-First Search — Optimize Driver Matching for DoorDash
DoorDash needs to effectively match drivers to delivery requests based on location and time constraints. Problem Statement: Given a grid of n x m representing a map where 1 represents an order location and 0 represents an empty space, implement a function maxDrivers(orders: List[List[int]], start: Tuple[int, int]) -> int that returns the maximum number of deliveries that can be assigned to drivers originating from start position.Example 1: Input: orders = [[0,0,0],[0,1,0],[0,0,0]], start = (1, 1) Output: 1 Explanation: The only reachable order is at (1,1).Constraints:
1 <= orders.length, orders[i].length <= 20
0 <= start[0] < orders.length
0 <= start[1] < orders[i].length
codingHardsliding window#8
8. [OA] Sliding Window — Design a delivery tracking system for DoorDash
DoorDash needs a robust method to track orders and ensure timely deliveries based on real-time traffic data. Problem Statement: Given an array of integers representing the estimated delivery times for incoming orders, implement a function maxDeliveryTime(orders: List[int], k: int) -> int that returns the maximum possible delivery time over any sub-array of size k, where k is the number of concurrent deliveries.Example 1: Input: orders = [2, 1, 3, 5, 6, 4], k = 3 Output: 14 Explanation: The best sub-array is [5, 6, 4], which yields a delivery time of 5 + 6 + 4 = 15.Constraints:
1 <= orders.length <= 100000
1 <= orders[i] <= 1000
1 <= k <= orders.length
system designMediumapi design#9
9. Design DriverPayoutCalculator — API for calculating driver payouts
1. Background: As DoorDash scales and the number of drivers increases, calculating payouts accurately and efficiently is imperative for maintaining driver satisfaction and operational effectiveness. This system must account for various factors such as distance traveled, time taken, and any bonus multipliers based on peak hours or promotional events. 2. Requirements: 1. Must calculate base payout based on distance and time. 2. Must incorporate bonus multipliers for peak hours and special events. 3. Must handle concurrent requests to ensure performance at scale. 4. Must return detailed breakdown of payout (base, bonus, total). 3. Class API: - def calculate_base_payout(distance: float, time: float) -> float: Calculates base payout based on distance and time. - def apply_bonus_multiplier(base: float, multiplier: float) -> float: Applies a bonus multiplier to the base payout. - def compute_total_payout(distance: float, time: float, multiplier: float) -> dict: Calculates total payout and returns a breakdown. 4. Example 1:compute_total_payout(10.0, 30.0, 1.5) → Output: {'base': 15.0, 'bonus': 7.5, 'total': 22.5} → Explanation: Based on distance and time, base payout is $15. Applying a 1.5x bonus gives $7.5, totaling $22.5. 5. Constraints: - Maximum distance: 100 miles - Maximum time: 180 minutes - Multiplier range: 1.0 to 3.0 (for peak times)
system designSeniorcaching#10
10. [OA] Cache Implementation — Design a Delivery Caching System for DoorDash
DoorDash needs to cache the most frequently accessed delivery routes to improve API response time. Problem Statement: Implement an LRUCache class with the following methods:
__init__(self, capacity: int): Initialize the LRU cache with positive size capacity.
get(self, key: int) -> int: Return the value of the key if the key exists, otherwise return -1.
put(self, key: int, value: int) -> None: Update the value of the key if the key exists, or add the key-value pair if the key does not exist. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.
Example 1: Input: cache = LRUCache(2) cache.put(1, 1) cache.put(2, 2) cache.get(1) Output: 1 Explanation: The cache contains 1 and 2, and the value for key 1 is 1.Constraints:
1 <= capacity <= 3000
0 <= key, value <= 10000
Start practicing DoorDash questions
Sign up for free to access walkthroughs, AI-generated questions, and more.