SpinTheMic
Pro

Interview practice question

Modelling a file system with the composite pattern

Backend Engineering · OOP and Design Patterns · Experienced

Design classes for a file storage service where folders contain files and other folders, and you need operations like total size and permission checks.

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Composite pattern: Node interface.
  • File (leaf) and Folder (composite).
  • Recursive operations (size, search).
  • Permissions inherited from parents.
  • Watch depth and performance.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics