// Given a directory, return the path to the deepest object within this directory.
// For example, given the following directory, file3 would be the deepest
// object within the directory, and the path to return is
// "directory/subDirectory3/subDirectory4/subdirectory5/file3"
/*
|-- subDirectory1
| |-- file1
| |-- subDirectory2
| | |-- file2
|-- subdirectory3
|-- subDirectory4
| |-- subDirectory5
| | |-- |-- file3
|-- file4
*/
public class Directory {
public Directory[] children;
public String name;
}
public class Solution {
public String findLongestFilePath(Directory directory) {
/*solution goes here */
}
}