Problem database last updated: June 20, 2025

DDoorDash logo

DoorDash Coding Interview Questions

71 problems · 5 Easy, 43 Medium, 23 Hard · Ranked #35 of 458

Difficulty breakdown

5 Easy

7% · avg 23%

43 Medium

61% · avg 59%

23 Hard

32% · avg 18%

Top topics

array
66.2%
depth-first-search
25.4%2.8x
string
25.4%
hash-table
25.4%
breadth-first-search
22.5%2.7x
sorting
18.3%

Interview profile

Based on 71 reported problems, DoorDash interviews are significantly harder than average - 32% Hard vs 18% across all companies. The majority (61%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, DoorDash puts unusual emphasis on union-find (12.7% of problems, 4.3x the industry average), topological-sort (4.2% of problems, 3.6x the industry average), bucket-sort (2.8% of problems, 3.6x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (66.2%), depth-first-search (25.4%), string (25.4%), hash-table (25.4%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 71 problems

Binary Tree Maximum Path Sum

Solve

A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequ...

HardVery Likely
dynamic-programmingtreedepth-first-search

Longest Increasing Path in a Matrix

Solve

Given an m x n integers matrix, return the length of the longest increasing path in matrix.

HardVery Likely
arraydynamic-programmingdepth-first-search

Maximum Profit in Job Scheduling

Solve

We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i].

HardVery Likely
arraybinary-searchdynamic-programming

Search Suggestions System

Solve

You are given an array of strings products and a string searchWord.

MediumVery Likely
arraystringbinary-search

Koko Eating Bananas

Solve

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

MediumVery Likely
arraybinary-search

Most Profit Assigning Work

Solve

You have n jobs and m workers. You are given three arrays: difficulty, profit, and worker where:

MediumVery Likely
arraytwo-pointersbinary-search

Check if One String Swap Can Make Strings Equal

Solve

You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a string (not necessarily different) and swap...

EasyLikely
hash-tablestringcounting

Minimum Number of Steps to Make Two Strings Anagram

Solve

You are given two strings of the same length s and t. In one step you can choose any character of t and replace it with another character.

MediumLikely
hash-tablestringcounting

Single-Threaded CPU

Solve

You are given n​​​​​​ tasks labeled from 0 to n - 1 represented by a 2D integer array tasks, where tasks[i] = [enqueueTimei, processingTimei] means that the i​​...

MediumLikely
arraysortingheap-priority-queue

Find K Closest Elements

Solve

Given a sorted integer array arr, two integers k and x, return the k closest integers to x in the array. The result should also be sorted in ascending order.

MediumLikely
arraytwo-pointersbinary-search

Buddy Strings

Solve

Given two strings s and goal, return true if you can swap two letters in s so the result is equal to goal, otherwise, return false.

EasyLikely
hash-tablestring

Next Greater Element III

Solve

Given a positive integer n, find the smallest integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such pos...

MediumLikely
mathtwo-pointersstring

Making A Large Island

Solve

You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1.

HardLikely
arraydepth-first-searchbreadth-first-search

Find Nearest Point That Has the Same X or Y Coordinate

Solve

You are given two integers, x and y, which represent your current location on a Cartesian grid: (x, y). You are also given an array points where each points[i]...

EasyLikely
array

Count Sub Islands

Solve

You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing water) and 1's (representing land). An island is a group of 1's connec...

MediumLikely
arraydepth-first-searchbreadth-first-search

Asteroid Collision

Solve

We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space...

MediumLikely
arraystacksimulation

Count Nodes With the Highest Score

Solve

There is a binary tree rooted at 0 consisting of n nodes. The nodes are labeled from 0 to n - 1. You are given a 0-indexed integer array parents representing th...

MediumLikely
arraytreedepth-first-search

Serialize and Deserialize Binary Tree

Solve

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitte...

HardLikely
stringtreedepth-first-search

Basic Calculator II

Solve

Given a string s which represents an expression, evaluate this expression and return its value.

MediumLikely
mathstringstack

Count All Valid Pickup and Delivery Options

Solve

Given n orders, each order consists of a pickup and a delivery service.

HardLikely
mathdynamic-programmingcombinatorics

Course Schedule II

Solve

There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...

MediumLikely
depth-first-searchbreadth-first-searchgraph

Vertical Order Traversal of a Binary Tree

Solve

Given the root of a binary tree, calculate the vertical order traversal of the binary tree.

HardLikely
hash-tabletreedepth-first-search

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyLikely
arrayhash-map

Implement Trie (Prefix Tree)

Solve

A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various appl...

MediumLikely
hash-tablestringdesign

Immediate Food Delivery II

Solve

Table: Delivery

MediumLikely
database

Jump Game

Solve

You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...

MediumLikely
arraydynamic-programminggreedy

Interval List Intersections

Solve

You are given two lists of closed intervals, firstList and secondList, where firstList[i] = [starti, endi] and secondList[j] = [startj, endj]. Each list of inte...

MediumLikely
arraytwo-pointersline-sweep

Mice and Cheese

Solve

There are two mice and n different types of cheese, each type of cheese should be eaten by exactly one mouse.

MediumLikely
arraygreedysorting

Subsequence With the Minimum Score

Solve

You are given two strings s and t.

HardLikely
two-pointersstringbinary-search

Basic Calculator

Solve

Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.

HardLikely
mathstringstack

Task Scheduler

Solve

You are given an array of CPU tasks, each labeled with a letter from A to Z, and a number n. Each CPU interval can be idle or allow the completion of one task....

MediumLikely
arrayhash-tablegreedy

Largest Rectangle in Histogram

Solve

Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the his...

HardLikely
arraystackmonotonic-stack

01 Matrix

Solve

Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.

MediumSometimes
arraydynamic-programmingbreadth-first-search

Next Permutation

Solve

A permutation of an array of integers is an arrangement of its members into a sequence or linear order.

MediumSometimes
arraytwo-pointers

Max Area of Island

Solve

You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume al...

MediumSometimes
arraydepth-first-searchbreadth-first-search

Word Search II

Solve

Given an m x n board of characters and a list of strings words, return all words on the board.

HardSometimes
arraystringbacktracking

Number of Visible People in a Queue

Solve

There are n people standing in a queue, and they numbered from 0 to n - 1 in left to right order. You are given an array heights of distinct integers where heig...

HardSometimes
arraystackmonotonic-stack

Minimum Size Subarray Sum

Solve

Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If...

MediumSometimes
arraybinary-searchsliding-window

Longest Common Subsequence

Solve

Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0.

MediumSometimes
stringdynamic-programming

Swim in Rising Water

Solve

You are given an n x n integer matrix grid where each value grid[i][j] represents the elevation at that point (i, j).

HardSometimes
arraybinary-searchdepth-first-search

Design Add and Search Words Data Structure

Solve

Design a data structure that supports adding new words and finding if a string matches any previously added string.

MediumSometimes
stringdepth-first-searchdesign

Jump Game II

Solve

You are given a 0-indexed array of integers nums of length n. You are initially positioned at index 0.

MediumSometimes
arraydynamic-programminggreedy

Sudoku Solver

Solve

Write a program to solve a Sudoku puzzle by filling the empty cells.

HardSometimes
arrayhash-tablebacktracking

Ways to Make a Fair Array

Solve

You are given an integer array nums. You can choose exactly one index (0-indexed) and remove the element. Notice that the index of the elements may change after...

MediumSometimes
arrayprefix-sum

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumSometimes
arraydepth-first-searchbreadth-first-search

LRU Cache

Solve

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.

MediumSometimes
hash-tablelinked-listdesign

Sliding Window Maximum

Solve

You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see...

HardSometimes
arrayqueuesliding-window

Sliding Window Median

Solve

The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middl...

HardSometimes
arrayhash-tablesliding-window

Minimize Malware Spread

Solve

You are given a network of n nodes represented as an n x n adjacency matrix graph, where the ith node is directly connected to the jth node if graph[i][j] == 1.

HardSometimes
arrayhash-tabledepth-first-search

Maximum Gap

Solve

Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the array contains less than two elements, ret...

MediumSometimes
arraysortingbucket-sort

Number of Provinces

Solve

There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, t...

MediumSometimes
depth-first-searchbreadth-first-searchunion-find

Maximum Path Quality of a Graph

Solve

There is an undirected graph with n nodes numbered from 0 to n - 1 (inclusive). You are given a 0-indexed integer array values where values[i] is the value of t...

HardSometimes
arraybacktrackinggraph

4Sum

Solve

Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:

MediumSometimes
arraytwo-pointerssorting

Course Schedule

Solve

There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, b...

MediumSometimes
depth-first-searchbreadth-first-searchgraph

Capacity To Ship Packages Within D Days

Solve

A conveyor belt has packages that must be shipped from one port to another within days days.

MediumSometimes
arraybinary-search

LFU Cache

Solve

Design and implement a data structure for a Least Frequently Used (LFU) cache.

HardSometimes
hash-tablelinked-listdesign

Design Browser History

Solve

You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the hist...

MediumRare
arraylinked-liststack

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumRare
arrayhash-tablestring

Longest Palindromic Substring

Solve

Given a string s, return the longest palindromic substring in s.

MediumRare
two-pointersstringdynamic-programming

Task Scheduler II

Solve

You are given a 0-indexed array of positive integers tasks, representing tasks that need to be completed in order, where tasks[i] represents the type of the ith...

MediumRare
arrayhash-tablesimulation

K-Similar Strings

Solve

Strings s1 and s2 are k-similar (for some non-negative integer k) if we can swap the positions of two letters in s1 exactly k times so that the resulting string...

HardRare
hash-tablestringbreadth-first-search

Similar String Groups

Solve

Two strings, X and Y, are considered similar if either they are identical or we can make them equivalent by swapping at most two letters (in distinct positions)...

HardRare
arrayhash-tablestring

Counting Words With a Given Prefix

Solve

You are given an array of strings words and a string pref.

EasyRare
arraystringstring-matching

Number of Closed Islands

Solve

Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island totally (all...

MediumRare
arraydepth-first-searchbreadth-first-search

Maximum Performance of a Team

Solve

You are given two integers n and k and two integer arrays speed and efficiency both of length n. There are n engineers numbered from 1 to n. speed[i] and effici...

HardRare
arraygreedysorting

Valid Sudoku

Solve

Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:

MediumRare
arrayhash-tablematrix

Top K Frequent Elements

Solve

Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.

MediumRare
arrayhash-tabledivide-and-conquer

Path Sum II

Solve

Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. Each path...

MediumRare
backtrackingtreedepth-first-search

Range Sum Query 2D - Immutable

Solve

Given a 2D matrix matrix, handle multiple queries of the following type:

MediumRare
arraydesignmatrix

Insert Delete GetRandom O(1)

Solve

Implement the RandomizedSet class:

MediumRare
arrayhash-tablemath

Merge k Sorted Lists

Solve

You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.

HardRare
linked-listdivide-and-conquerheap-priority-queue

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent DoorDash interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your DoorDash coding interview

DoorDash interviews focus heavily on array, depth-first-search, string problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. DoorDash interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does DoorDash ask in interviews?add

DoorDash has been reported to ask 71 distinct coding problems. The most common topics are array, depth-first-search, string. 5 are Easy difficulty, 43 are Medium, and 23 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are DoorDash coding interviews?add

Based on 71 reported problems, DoorDash interviews are significantly harder than average - 32% Hard vs 18% across all companies. 61% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a DoorDash coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, depth-first-search, string. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your DoorDash interview?

Simulate a real DoorDash coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a DoorDash interview with AIarrow_forward