November 2017
Intermediate to advanced
386 pages
9h 22m
English
Data structures, which include recursion in their definition, are naturally appropriate for recursive techniques. Let's consider here, for example, how to traverse a complete file system directory, listing all of its contents. Where's the recursion? The answer follows if you consider that each directory can do either of the following:
Let's work out a full recursive directory listing -- meaning, when we encounter a directory, we proceed to also list its contents and, if those include more directories, we also list them, and so on. We'll be using the same Node.js functions as ...