Technical Interview Question #7

Technical Interview Series

An array contains filenames stored as a strings. Each filename includes the full path and filename in proper UNC format. Build a list of all folder names represented in a storage structure of your choosing — folders may be listed only once.

As always, consider the performance and memory impact of your algorithm.