NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

(This question is a variation of the LeetCode question 609. Find Duplicate File in System. If you haven't completed that question yet, it is recommended to solve it first.)

You need to find groups of duplicate files with identical binary content in a simulated file system. The system is rooted at the directory "/".

Two files are considered duplicates if and only if their complete binary contents are exactly the same, file names and paths do not matter. File content may be large and is accessible only as a binary stream, and you do not have direct string content access. You are asked to design an efficient approach that can find duplicate files within a large number of files and directories.

Stdout
-