Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Locate a specific file or directory node in a tree-structured virtual file system by name.
Calculate the cumulative size of all files contained within the target node's subtree.
Handle both direct file lookups and nested directory aggregations efficiently.
What This Tests
Tree traversal and navigation techniques
Iterative versus recursive algorithm design
Subtree aggregation and state accumulation
Polymorphic object hierarchy handling
Common Patterns
DFS/BFS
Graph Traversal
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Stdout
-