Verified interview challenge
Find duplicate files
Find files with identical contents across a collection of directory descriptions.
Unlock with Full AccessThe challenge
The input describes directories, filenames and the text stored in each file. Write a program that identifies duplicate contents and reports the matching file paths in the required order. Filenames alone cannot tell you which files belong together.
- Work from the supplied input
- The exercise provides directory descriptions as text. You do not need to scan a real filesystem.
What you'll practise
Parsing file descriptions
Separate directory paths, filenames and contents without changing the stored text.
Grouping duplicates
Identify equal contents across different directories and filenames.
Consistent output
Report every duplicate group in the specified order, including cases with no matches.
solution.pyPython 3.13
import sys
def main():
# Read input and print your result
passTest cases
Run your code to see results.
Full instructions, starter code and test cases included with Full Access.