Design In-Memory File System

Design an in-memory file system with the following APIs:

  • ls(path):
    • If path is a file, return a list containing only that file name.
    • If path is a directory, return all immediate file a...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: