子将奚先?
这两个函数均按照深度优先的顺序遍历树,但两者的差异在于先访问一个节点还是先访问其子节点。
Both functions walk the tree in depth-first order but they differ in whether a node is visited before or after its children.
在对当前子节点进行任何其它处理之前,先装入下个子节点的引用(第7行)。
The reference for the next child node is loaded (line 7) before any other processing is done for the current child.
应用推荐