← Questions

List every file path in a directory tree

0
NvidiaCodingLast asked Mar 2026

Given a directory tree (folders containing files and other folders), return the full path of every file. Write it with a depth-first search, then discuss an iterative version and very deep trees.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding