Back to problems

Build a Directory Tree and Iteratively Find File Paths

Algorithm · Uber · Medium

Directory Tree File Locator Medium · Topics · Company Tags · Hints You are presented with a sequence of absolute file paths in a Unix-like file system. Your task is to construct a tree representation of the directory hierarchy such that each path element (e.g., home, documents, notes.txt) is a distinct vertex in the tree. While directory names may be reused at different locations, no two input paths are identical. Subsequently, given a file name string target, identify every…

Checking your access…