Design In-Memory File System
Try to solve the Design In-Memory File System problem.
We'll cover the following...
Statement
Design an in-memory file system by implementing a struct, FileSystem, which should provide the following functionalities:
-
Init(): Initializes the object of the system.
-
Ls(String path): If path is a file path, return a list that only contains the file’s name. If it’s a directory path, return the list of files and directory names in this directory. Your function should return the output (file and directory names together) in lexicographical order. ...
Ask