PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/DoorDash

Solve tree distance and design file system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to compute distances within tree structures and to design efficient hierarchical data structures supporting dynamic queries and updates, testing skills in tree algorithms and data structure design within the Coding & Algorithms domain.

  • Medium
  • DoorDash
  • Coding & Algorithms
  • Software Engineer

Solve tree distance and design file system

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

##### Question Given a binary tree, find the maximum distance between two 'alive' nodes, where 'alive' nodes are initially the leaves; follow-up: allow the set of 'alive' nodes to be specified arbitrarily. LeetCode 1166. Design File System https://leetcode.com/problems/design-file-system/description/

Quick Answer: This question evaluates a candidate's ability to compute distances within tree structures and to design efficient hierarchical data structures supporting dynamic queries and updates, testing skills in tree algorithms and data structure design 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
Aug 4, 2025, 10:55 AM
Software Engineer
Onsite
Coding & Algorithms
2
0
Question

Given a binary tree, find the maximum distance between two 'alive' nodes, where 'alive' nodes are initially the leaves; follow-up: allow the set of 'alive' nodes to be specified arbitrarily. LeetCode 1166. Design File System

https://leetcode.com/problems/design-file-system/description/

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.