Coinbase | Phone | In memory File System
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-01-22Added By Anonymous
Source: Link
Asked to write an in-memory file system. Although there was a variant.
1.mkdir -> /a should create director a. /a/b should only create b if /a exists. If a and b dont exists it needs to error out
2.write_file -> If intermittent directories are absent then throw error
3.readfile -> This is the usual one.
Inspite of knowing the answer got rejected. Weird. Good Luck!!