1p3a Experience · Oct 2025

Doordash Fulltime SDE Tech Phone Screen Interview Experience on 2025-10-06

SWE Phone Screen
1 upvote 1 reply

Interview Experience

Fresh interview experience, posted right after the interview! I've also included my solutions, the interviewer's test cases, and a runnable setup. Please share other interview experiences, thank you!

Full Details

Fresh interview experience, posted right after the interview! I've also included my solutions, the interviewer's test cases, and a runnable setup. Please share other interview experiences, thank you! Overall it was okay, the time was about the same, the interviewer was very kind, and my code

passed all the test cases. The following content requires points higher than 180. You can already browse // A chef receives all his orders for the day as a list of order ids. // Given this list, the chef chooses to prepare them in the following way. // He creates a new list by repeatedly removing the smallest eligible order // from the list and appending it to the new list. // An order is considered eligible if its id is greater than its immediate left and right neighbors in the list. //

Return the order in which the chef creates the new list //

Clarifications: For order id at index 0, it is eligible if it is greater than its right neighbor [Since no left neighbor exists] For order id at index n-1 in a list of size n, it is eligible if it is greater than its left neighbor [Since no right neighbor exists] When there is only one order in the list, it is automatically eligible. Order ids are unique. //Example // order_ids = [3, 5, 1, 4, 2] //

solution = [4, 2, 5, 3, 1] import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*; public class Solution { static int[] addNumbers(int[] nums) { if(nums == null || nums.length == 0)

return new int[]{}; int n = nums.length; int[] leftIndex = new int[n], rightIndex = new int[n]; boolean[] isGood = new boolean[n]; for(int i = 0; i < n; i++) { leftIndex[i] = i - 1; rightIndex[i] = i == n - 1 ? -1 : i + 1; isGood[i] = true; } PriorityQueue pq = new PriorityQueue<>((a, b) -> Integer.compare(a[0], b[0])); for(int i = 0; i < n; i++) { if(eligible(nums, leftIndex, rightIndex, i, isGood)) pq.add(new int[]{nums[i], i}); } int[] res = new int[n]; int resIndex = 0; while(!pq.isEmpty()) { int[] element = pq.poll(); int index = element[1]; res[resIndex++] = element[0]; isGood[index] = false; int left = leftIndex[index], right = rightIndex[index]; if(left != -1) rightIndex[left] = right; if(right != -1) leftIndex[right] = left; if(left != -1 && eligible(nums, leftIndex, rightIndex, left, isGood)) pq.add(new int[]{nums[left], left}); if(right != -1 && eligible(nums, leftIndex, rightIndex, right, isGood)) pq.add(new int[]{nums[right], right}); }

return res; } private static boolean eligible(int[] nums, int[] leftIndex, int[] rightIndex, int i, boolean[] isGood) { if(!isGood[i])

return false; int left = leftIndex[i], right = rightIndex[i]; if(left == -1 && right == -1)

return true; if(left == -1)

return nums[right] < nums[i]; if(right == -1)

return nums[left] < nums[i];

return nums[right] < nums[i] && nums[left] < nums[i]; } public static void main(String args[] ) throws Exception { int[] t1 = {3, 5, 1, 4, 2}; int[] t2 = {}; int[] t3 = {1}; int[] t4 = {4,1,5}; int[] t5 = {1, 2, 3, 4, 5}; int[] t6 = {5, 3, 1, 2, 4}; int[] res1 = addNumbers(t6); for(int i : res1) { System.out.println(i); } } }

About This Question

This is a candidate experience report from a doordash interview for a swe role during the phone screen round reported in 2025.

It covers the following topics: Heap, Queue, Strings .