Design a data structure that simulates an in-memory file system.

Implement the FileSystem class:

FileSystem() Initializes the object of the system
List ls(String path)
Returns the list of directory names in this directory. The answer should be in lexicographic order.
void mkdir(String path)
Makes a new directory according to the given path. If the middle directories in the path do not exist, you should create them as well.

Comments (0)