Free written solution

Find Duplicate File in System (LeetCode 609): Solution and Explanation

Each input string names a directory and the files in it with their contents in parentheses. Return every group of two or more full paths whose files have identical content. Groups and paths may come in any order.

Read the intuition, approach, code and complexity →