Find Duplicate Files in a System
Problem
Given a list of directory paths, each with the files it holds and their contents, group together all files that have identical content across the whole system.
Input / Output
- Input: a list of directories, each described by its path and the (filename, content) pairs it contains.
- Output: groups of file paths, where each group holds two or more files with identical content.
Constraints
- Many files; individual contents can be large.
- Only groups with more than one file are of interest.
Example
group files by content -> lists of duplicate paths (only groups of size >= 2)
added …