USA | Doordash Onsite AI Codecraft
Anonymous User
3070

This round was a pretty fun round and you do need to come with a local editor with an AI setup. A ChatGPT tab is not enough. You need to use stuff like VSCode with Copilot, Cursor, claude code, etc.

I personally recommend using Cursor with Claude Code! You'll thank me later :)

The actual question

Your goal is to build a workflow engine to automate DoorDash's self help menu. Support teams get tickets for issues like "my order arrived late" or "the order is missing an item". For common issues like these, we have aligned with support on some common protocols and your job is to build the automation engine to save support team hours of valuable time. BPOs are AKA "support team" at DoorDash!

You are given some code with a test case for the workflow automation engine. You need to make modifications and you should be using AI! DoorDash explicitly evaluates "prompt engineering ability". IDK how they check that, but that's a hint for you

The actual interface

  • Dataclass for OrderModel. This represents an order data returned from the fake API
  • MockDoorDashAPI - Mock API client for interacting with DoorDash services. It has functionality like get_order, get_current_eta, issue_refund(order_id, percent)
  • NodeType: Enum representing type of node in the workflow. It currently supports START, END, IS_LATE, FULL_REFUND
  • Node: Base class for all workflow nodes
  • Workflow: Represents workflow as a DAG of nodes. You can safely assume the workflow constructions you need to do are VALID ones and the input data will be properly stated. You will hav functions like add_node, get_node, get_start_node, from_txt. get_start_node and from_txt are stubbed out
  • WorkflowEngine: Given order id, execute the workflow. This class has an execute_workflow function that takes in workflow and order_id. order id is a string! execute_workflow is stubbed out function

There is a test case provided for reference

Part 1: Get the existing test case to pass

You have some stubbed out functions, so implement those functions and ensure the provided test case passes! You DO NOT need to modify the provided test case. The interviewer will give you correct test cases

It's ok to dump all your implementation into one main.py file. You don't have to make 10 different .py files b/c you have to submit everything in one file to the interviewer via Hackerrank. Yeah that kinda sucks, but it's a tradeoff you need to make for your 60 minute scope

Part 2: Support partial refund

In Part 1, if an order is late, you issue full refund. However, that's too much money loss for doordash. Suppose the dasher only delivers the order a little late. You should issue a partial refund.

Your job is to clarify the requirements with the interviewer on the this! Do use the existing interface you have to solve the problem, but clarify the product requirements

You will have a test case provided, but you should add a few more to verify your work

Part 3: Improving the code

Suppose the support team says that your workflow engine takes 10-20 seconds to run which is too slow operationally for them. How would you go about investigating the issue?

The interviewer then followed up with: "In the code you wrote, identify an area of improvement you'd make". I actually needed to implement some of the improvements though you are allowed to use AI

Tips

  • Thoroughly clarify and confirm all product requirements! Make sure your assumptions are in line with what the the interviewer had in mind. Time is too precious
  • You are NOT expected to finish "all the parts". There are more parts, but the interviewer controls the pace
  • Focus on writing good code and showcase your ability to not just tab tab tab all the way. Show the interviewer that you use LLM as an assistant, NOT as a crutch. I've failed candidates that do too much of the latter and it's painfully obvious from the other side
Comments (6)