Skip to main content
Advancedsystem design

Low-level design: model a UNIX-like file system in memory where users can search files with filters such as size, extension and name pattern, and new filters can be added later.

ReportedSource: GeeksforGeeks interview experience: Amazon SDE-II

Quick answerFree

File/Directory composite tree behind a FileSystem facade; search = tree walk with pluggable Filter objects (Size, Extension, Name, And/Or composites) so new criteria need no changes to the search code.

Detailed answer· ~110 words

Interview Prep

Unlock the full answer with Interview Prep

Get a ~110-word model answer, plus 91 more System Design questions.

Also in Pro (₹499 / 90 days).

+ 91 more System Design questions in Interview Prep, each with the full answer.

Discussion