Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1948. Delete Duplicate Folders in System
Given a list of absolute folder paths, build the directory tree and delete every folder (and its entire subtree) whose subfolder structure and names are identical to some other folder’s, then return the remaining paths. The core challenge is to detect identical subtrees efficiently via canonical serialization/hashing and remove all duplicates in a single pass (no cascading deletions).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.