你有没有感觉到,在树这样的数据结构中,递 归如呼吸般自然? ways.These are known as tree walkings or tree traversals.In a tree with the root N and subtrees T1,T2,...,Tn we define: pre-order traversal:visit the root node N,then visit all the nodes in T in pre-order,then visit all the nodes in T2 in pre-order, and so on until all the nodes in Tn are visited in pre-order. post-order traversal:visit the nodes of T1,T2,...,Tn in post-order (in that order);then visit the root node.你有没有感觉到,在树这样的数据结构中,递 归如呼吸般自然?