InterviewLegend

Heaps & Linked Lists

Alex Chen20 min readUpdated 166 real interview reports

A min-heap gives you the smallest item that qualifies right now. A doubly linked list lets you take an item out of the middle and join its two neighbors in O(1). DoorDash expects you to build both by hand, and one problem here needs them together.

Each of the other two problems uses one of those structures, one as a class called one operation at a time and one as a ranked search that keeps its heap small.

Start with the problem that needs both structures. It comes up most often at the phone screen and has no LeetCode twin to memorize. The other two show up less. If the heap operations themselves are rusty, the Foundations heaps intro and top-K problems rebuild them from scratch.

DoorDashPremium lesson · Coding round

The 3 DoorDash problems are below.

  1. A Premium questionCoding · Hard · Signature problem
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the DoorDash questions

$49 a year · all 100 companies · cancel anytime

From 166 DoorDash reports, forum threads behind logins and write-ups in Chinese.

Had your DoorDash interview?Tell us what they asked. Reviewed before it goes in, never with your name.
DoorDash interview guide

Know what DoorDash asks before you walk in.

30 coding · 5 system design · 21 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.