3 ms·
Trees don't always call themselves "trees." They can sneak up on you. Nested lists, for instance, are equivalent to trees, and nested lists show up all the time
by baddox 11y ago
Trees don't always call themselves "trees." They can sneak up on you. Nested lists, for instance, are equivalent to trees, and nested lists show up all the time. Perhaps your programming languages has some sort of recursive map function builtin, but a lot of common languages don't, and it really helps to be able to intuitively think about recursive traversal.