PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/DoorDash

Design a hierarchical path registry

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of hierarchical data structures and API design for path-based registries, testing skills in tree/trie representations, path validation rules, and algorithmic complexity within the Coding & Algorithms domain.

  • Medium
  • DoorDash
  • Coding & Algorithms
  • Software Engineer

Design a hierarchical path registry

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Implement an in-memory hierarchical path registry. Support: create(path, value) to create a new path with an integer value and get(path) to return its value or -1 if absent. Constraints: the root '/' exists implicitly; a path can be created only if its parent exists; creating an existing path fails; path segments use lowercase letters and '/' as separator. Describe data structures, APIs, and time/space complexity. Follow-ups: support update and delete (including subtree deletion rules), wildcard queries, and watch callbacks that trigger on changes to a path or subtree.

Quick Answer: This question evaluates understanding of hierarchical data structures and API design for path-based registries, testing skills in tree/trie representations, path validation rules, and algorithmic complexity within the Coding & Algorithms domain.

Related Interview Questions

  • Maximize Chef Assignment Profit - DoorDash (medium)
  • Compute Courier Delivery Pay - DoorDash (easy)
  • Compute Nearest Destination Distances - DoorDash (easy)
  • Count changed nodes between two menu trees - DoorDash (hard)
  • Calculate Daily Driver Pay - DoorDash (hard)
DoorDash logo
DoorDash
Jul 28, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
3
0

Implement an in-memory hierarchical path registry. Support: create(path, value) to create a new path with an integer value and get(path) to return its value or -1 if absent. Constraints: the root '/' exists implicitly; a path can be created only if its parent exists; creating an existing path fails; path segments use lowercase letters and '/' as separator. Describe data structures, APIs, and time/space complexity. Follow-ups: support update and delete (including subtree deletion rules), wildcard queries, and watch callbacks that trigger on changes to a path or subtree.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More DoorDash•More Software Engineer•DoorDash Software Engineer•DoorDash Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.