Available question text
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).
Related questions
Continue with questions that share topics or the same question type.
- Delete Duplicate Emails
Coding
- Contains Duplicate
Coding · Array · Hash Table · Sorting
- Contains Duplicate II
Coding
- Contains Duplicate III
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1948. Delete Duplicate Folders in System
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source