I’m renaming the series of interview questions to be “Coding Challenges.” Rules are still the same: you have about 30 minutes from start to finish for each question. The amount of code necessary to solve a problem is one or two whiteboards of reasonable sized handwriting (20-100 lines of code).
Create a structure best suited to efficiently storing a hierarchical file name and path system.
Now, write the code to merge two instances of the structures you have created into a single structure. There should be no duplicate file names in the single structure.