LLD Logo
LVL1
Composite Pattern

Step 1 of 4 · Define the component contract

1

Your task

Define the component contract

Give files and folders the same size operation.

Create the shared component abstraction.
Expose one operation that returns size.

filesystem_component.py

Your draft · saved locally

1

Structural feedback only—your code stays in this browser and is not executed.