2dbi
Home/Autodesk/Nested Filesystem Size (Boxes Within Boxes)
AAutodesk·DSASDE-2Onsite – Coding 1

Nested Filesystem Size (Boxes Within Boxes)

Problem

Model a filesystem of folders containing files and sub-folders; compute total size of any node. Solve iteratively, then improve recursively.

Example

folder{ a.txt(10), sub{ b.txt(5) } } -> 15

Constraints

  • Arbitrary nesting depth

What Autodesk looks for

Clean recursive traversal and handling of deep nesting; discuss stack depth limits.

added 6 days ago
LeadersAccount