LC: 1166. Design File System - spiralgo/algorithms GitHub Wiki

1166. Design File System

The Essence:

To represent the files and their folder, the problem-solver needs to use a data structure that can dynamically get updated. Since the file paths are strings, the problem solver needs to consider this requirement.

The usage of slashes ('/') in the path names also indicate how directories are split in parent-child structures. The problem-solver also needs to think about the mapping of these directories.

Details:

Hash tables are the primary tool for the solution to this problem, since they can take strings as keys. The built-in methods of programming languages are also useful tools for splitting the parent folder from the given input folder.