Imagine a simple filesystem made of boxes-within-boxes. [model it and compute over it]
Asked in the Coding round as an iterative and recursive programming task. Model each box as a dictionary whose values are either file sizes or nested boxes, then return the total size of every file.
Implement total_size(filesystem). The input is a nested dictionary: an integer value represents a file size in bytes, and a dictionary represents a nested box. Return the sum of all integer values. Empty boxes contribute zero.
def total_size(filesystem):