Google Interview Question

Print file directories given a string of file paths

Interview Answer

Anonymous

Jul 22, 2024

Used nested python dictionaries, solved on O(n) time. Be careful of how you phrase time complexity, it depends on the number of forward slashes in each file path as well.