DoorDash | E4 | Phone Screen | Virtual Onsite [Offer]
Anonymous User
10860

Call with recruiter. Basic call.

Phone Screen: https://leetcode.com/problems/max-area-of-island/, but instead of 1s and 0s, there were different numbers.

Onsite:

You have a list of intervals representing meeting times. You want to schedule another meeting that doesn't overlap with any other meeting, and this meeting is at least k minutes long. Return an array of intervals representing all possible times for this new meeting.
Follow up: Given a sorted list of meetings. Determine if you can schedule a a new meeting with a given start time and end time. (O(log(n) solution)

You have a list of dashers and a restaurant. Find the k-closest dashers to the restaurant (heap all the way).
What if we want to add new dashers individually?
How would you improve the performance, potentially allowing for inaccurate information for a few seconds?


Questions from the question pool that I was not asked:

Given a grid of numbers, find the longest path you can take by walking only on adjacent numbers of the same value. You cannot walk on the same number twice in the same path.

The solution is O(R * C * (4 ^ (R * C)) brute force. Dynamic programming does not work.

[
    [1, 1, 2, 1],
    [5, 5, 5, 5],
    [5, 5, 5, 1]
] 

A driver's route can be represented as follows:
Given a set list of pickups and deliveries for order, figure out if the given list is valid or not.

  • A delivery cannot happen for an order before pickup.
  • The same order cannot be delivered or picked up twice
  • The car must be empty at the end of the drive.

Examples below:
[P1, P2, D1, D2]==>valid
[P1, D1, P2, D2]==>valid
[P1, D2, D1, P2]==>invalid
[P1, D2]==>invalid
[P1, P2]==>invalid
[P1, D1, D1]==>invalid
[]==>valid
[P1, P1, D1]==>invalid
[P1, P1, D1, D1]==>invalid
[P1, D1, P1]==>invalid
[P1, D1, P1, D1]==>invalid

Follow up: Find the longest valid subarray. O(n^2) is obvious. O(n) involves careful consideration of all the cases of invalidity.

System design:
There will be a weekend-long event where people are making financial contributions to various political campaigns. Design the backend of a mobile app that will handle this.

Comments (14)