Problem Challenge: Folder Count
Solve a problem to test and practice your knowledge and understanding of file systems.
We'll cover the following...
We'll cover the following...
Problem statement
Implement two methods—directoryInsert and directoryMatchCount—for the provided directory paths.
The directoryInsert method takes the directory path as the input to create the given path.
The directoryMatchCount method returns the count of folders that are present from the start to the end of the path sequence.
Example 1
Sample input
directoryInsert("home/ben/files/movies")directoryInsert("home/mike/profile")directoryMatchCount("home/ben/files")directoryInsert("home/arnold/profile")directoryMatchCount("home/arnold/files")
...