Python3 solution - clean code (trie, dfs and Hashmap)
\nclass TrieNode:\n    def __init__(self, char):\n        self.children = {}\n        self.is_end = False\n        self.child_hash = ""\n        self.char = cha
```\nclass TrieNode:\n    def __init__(self, char):\n        self.children = {}\n        self.is_end = False\n        self.child_hash = ""\n        self.char = char\n\nclass Trie:\n    def __init__(self):\n        self.root = TrieNode("/")\n        self.hashmap = collections.defaultdict(int)\n        self.duplicates = []\n\n    def insert(self, folder):\n        current_node = self.root\n        for char in folder:\n            if char not in current_node.children:\n                current_node.children[char] = TrieNode(char)\n            current_node = current_node.children[char]\n        current_node.is_end = True\n\n    def _hash_children(self, root):\n        for char in sorted(root.children.keys()):\n            self._hash_children(root.children[char])\n            root.child_hash += char + \'|\' + root.children[char].child_hash + \'|\' \n        self.hashmap[root.child_hash] += 1\n    \n    def hash_children(self):\n        current_node = self.root\n        self._hash_children(current_node)\n    \n    def _get_duplicates(self, root, path):\n        if root.children and self.hashmap[root.child_hash] > 1: \n            return\n        self.duplicates.append(path + [root.char])\n        for char in root.children:\n            self._get_duplicates(root.children[char], path + [root.char])\n\n    def get_duplicates(self):\n        current_node = self.root\n        for char in current_node.children:\n            self._get_duplicates(current_node.children[char], [])\n        return self.duplicates\n\nclass Solution:\n    def deleteDuplicateFolder(self, paths: List[List[str]]) -> List[List[str]]:\n        trie = Trie()\n        for path in paths:\n            trie.insert(path)\n        trie.hash_children()\n        return trie.get_duplicates()\n```
['Depth-First Search', 'Trie', 'Python3']