Design an In-Memory File System
Problem
Design an in-memory file system with path resolution.
Requirements
mkdir,addContentToFile,readContentFromFile,ls- Absolute paths /a/b/c
- Files vs directories
What evaluators look for
- Tree of nodes; clean path resolution
- Separation of structure vs content
- Edge cases (existing path, file-as-dir)
Extension
Add symlinks; discuss cycle prevention.
added …