| ||
Limiting the traversal depth Tree traversal algorithms usually go over all nodes of a tree assuming that full traversal is required by the calling code. However, oftentimes calling code needs to process only the subset of the tree's levels meaning that it doesn't need to go all the way to the leaf level of a tree. Needless to say that in this case full traversal carries significant overhead since it traverses the nodes that are simply ignored by the calling code.
|
||
|
||
Copyright © 2001 Alexander Ananiev & MyArch.com. All rights reserved. Java is a trademark of Sun Microsystems. All other trademarks are the property of their respective holders. |