Build a workflow engine to automate DoorDash's self-help support menu.
Interface: OrderModel dataclass for order data; MockDoorDashAPI with get_order, get_current_eta, issue_refund(order_id, percent); NodeType enum supporting START, END, IS_LATE, FULL_REFUND; Node base class; Workflow as a DAG of nodes with add_node, get_node, get_start_node, from_txt (get_start_node and from_txt are stubbed); WorkflowEngine.execute_workflow(workflow, order_id) is stubbed. A reference test case is provided. Part 1: implement the stubs so the existing test case passes; everything goes in one main.py submitted via HackerRank in a 60-minute scope. A local AI editor setup is expected and prompt engineering ability is explicitly evaluated.
Goal: support teams get tickets such as "my order arrived late" or "the order is missing an item"; build the automation engine for these common protocols on top of the provided code and test case, using AI. Part 1: implement the stubbed functions so the provided test case passes. Part 2: support partial refunds when an order is only a little late, clarifying the requirements with the interviewer and adding test cases. Part 3: the support team says the engine takes 10-20 seconds to run; investigate and implement an improvement. The interviewer controls the pace and you are not expected to finish all parts.
Expect follow-ups like
- Part 2 - support partial refunds: if the dasher delivers only a little late, issue a partial refund instead of a full one. Clarify the product requirements with the interviewer, use the existing interface, and add a few of your own test cases.
- Part 3 - the support team says the workflow engine takes 10-20 seconds to run, too slow operationally. How would you investigate? Then identify an area of improvement in the code you wrote (you may need to implement some of it, AI use allowed).
Community answers
Related courses


