title: What is the time complexity of iterating through a nested file directory?
body: <p>If I have directory with subdirectories or files, and the subdirectories can be nested at an unknown number of levels, what is the time complexity of traversing through the entire directory?</p>
  <p>My thought was O(number of files) because it's only at the leaf nodes that you would call a function to say, append file contents to a larger file. But I'm not entirely sure. Can someone walk me through how to determine this?</p>