Back to problems

Design In-Memory File System

Object-Oriented Programming · Snowflake · Medium

Build an In-Memory File System Create a data structure that behaves like a file system stored entirely in memory. Implement the FileSystem class: FileSystem() Creates a new file-system instance. List ls(String path) When path identifies a file, return a list containing just that file's name. When it identifies a directory, return the names of every immediate file and subdirectory within it. void mkdir(String path) Creates the directory specified by the path. That exact…

Checking your access…