We are going to compare two directories in this problem.
All files in this problem are empty files, so all files are identical.
Directories are containers for files and other directories.
Two directories are considered identical if everything found in one directory exists and is identical to the one with the same name in the other directory.
N at the first lineN lines of pathMM lines of path path
paths/a and /A are different paths/ is used in problem as the separator//\ , it indicates the last object in the path is a directory, otherwise it is a file.For example, /a/example/of/path should be intepreted as:
create a directory named "a" in the root directory "/" if it does not exist
create a directory named "example" in "/a/" if it does not exist
create a directory named "of" in "/a/example/" if it does not exist
create a empty file named "path" in "/a/example/of/"
And
a/b/c/d/
a/b/e/f/
a/b/e/g
would give us:
a/
└── b/
├── c/
│ └── d/
└── e/
├── f/
└── g
M lines, each line contains a character i or d indicating either the two paths' content is identical or different.