The Delete Duplicate Folders in System interview question is a complex file system challenge. You are given a list of paths representing a folder structure. You need to identify and delete all folders that have the exact same structure of subfolders (including their names and their own sub-structures). This Delete Duplicate Folders in System coding problem is a test of tree serialization and hashing.
This is a HARD difficulty problem asked by companies like Nvidia and Google. it tests your proficiency with Tries, Tree Traversal, and Hash Functions. It evaluates if you can serialize a complex recursive structure into a string and use a map to find identical duplicates. It’s a classic deduplication problem found in storage systems and compilers.
This utilizes the Array, Hash Table, Trie, Hash Function interview pattern.
Paths: /a/x, /a/y, /b/x, /b/y
Master "Tree Serialization." Whether it's binary trees or file systems, the ability to convert a recursive structure into a unique string is a vital skill for comparison and caching problems.
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Palindrome Pairs | Hard | Solve | |
| Replace Words | Medium | Solve | |
| Find the Length of the Longest Common Prefix | Medium | Solve | |
| Shortest Uncommon Substring in an Array | Medium | Solve | |
| Short Encoding of Words | Medium | Solve |