Write code to process nested folders/files, print their full names, and deduplicate them.
Asked in the Technical Screen stage. Represent the hierarchy as nested dictionaries. Each node has name, type, and, for folders, a children list. Return unique full paths in depth-first traversal order. The root path must be included, and duplicate paths must appear only once.
deduplicate_full_names(root) accepts one folder dictionary and returns a list of strings. Paths use / as the separator.
name and type; type is either folder or file.children list, which may be empty./.def deduplicate_full_names(root):