← DoorDash Interview Insights

DoorDash·Software Engineer·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

DoorDash software engineering interview with a meaty system design coding question. The problem was a custom hierarchical key-value store built on UNIX-style paths, which sounds manageable until you realize how many edge cases they actually want you to cover.

Questions Asked (1)

Q1

Design and implement a hierarchical key-value store that operates on UNIX-style absolute paths, supporting create, set, get, and remove operations. Each operation has specific failure conditions: create fails if the parent doesn't exist or the path already exists, set fails on missing paths, and remove fails if the node has children. You need to choose your return types, define path syntax assumptions, justify your data structure choices, analyze complexity, and write unit tests covering edge cases.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This was a lot to hold in your head at once.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying assumptions about path syntax and return types, then propose a tree-based data structure where each node represents a path segment. Walk through each operation's logic and failure conditions, analyze time/space complexity, and outline unit tests covering edge cases.

Pro tip: Explicitly state your assumptions about path normalization (e.g., trailing slashes, '.' and '..') and error handling (e.g., exceptions vs. error codes) before diving into the design—this shows you think about real-world robustness and API design.

1. Clarify Requirements and Assumptions

Define path syntax (e.g., absolute paths starting with '/', segments separated by '/', no empty segments except root), return types (e.g., boolean for create/remove, value or null for get), and error handling strategy (exceptions or error codes).

2. Choose Data Structure and Justify

Select a tree where each node stores a value and a map of child segments to nodes. Justify why a tree (or trie) is ideal for hierarchical paths, enabling efficient traversal and operations.

3. Design Operations and Failure Conditions

For each operation, describe the traversal logic and how to check failure conditions: create (parent exists, path doesn't exist), set (path exists), get (path exists), remove (path exists, no children).

4. Analyze Complexity

Analyze time complexity as O(k) where k is the number of path segments, and space complexity as O(total number of nodes). Discuss trade-offs vs. alternatives like hash maps.

5. Outline Unit Tests

List test cases covering edge cases: root operations, deep paths, invalid paths, create with missing parent, set on missing path, remove with children, and concurrent modifications if applicable.

Key Points to Mention

  • Path normalization and validation (e.g., handling trailing slashes, '.' and '..', empty segments)
  • Choice of tree/trie data structure and why it suits hierarchical key-value storage
  • Return type design (e.g., boolean, value, error codes) and consistency across operations
  • Failure conditions and how to detect them during traversal
  • Time and space complexity analysis for each operation
  • Unit test coverage for edge cases like root operations, deep nesting, and invalid inputs

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.