On Thu, May 19, 2011 at 2:16 AM, Thomas A. Russ <t...@sevak.isi.edu> wrote: > Well, unless you have a tree with backpointers, you have to keep the > entire parent chain of nodes visited. Otherwise, you won't be able to > find the parent node when you need to backtrack. A standard tree > representation has only directional links.
Sure, but there are plenty of trees that do have parent pointers. Widgets on every system I've tinkered with always have, and in a directory structure that doesn't allow files to be in multiple places, it's not hard (look at the . and .. entries in a directory). Of course, file systems are not idealized tree structures, so things will be a bit more complicated. ChrisA -- http://mail.python.org/mailman/listinfo/python-list