Booking Amsterdam phone interview question
Anonymous User
2702

There's a high percentage of identical files and folders in the storage and we want to compact it. As a solution we decided to find all identical folder structures, deduplicate and create symbolic links to the only copy.

2 folders are identical if they contain an identical set of files and subfolders. 2 files are identical if they have the same name.

image

In the example above folder bar/baz/boo is identical to bar/fizz/buzz and foo/boo; also bar/baz is identical to foo. Write a program to de-duplicate identical structures on the disk.

How would you solve this?

Comments (3)