Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果树有任何用星号填充的空子节点,是否可以仅在按顺序遍历的情况下重建树?(但不一定是平衡的)
A / \ B F / \ / \ G * * * / \ * *
不,即使是简单的两节点树,也存在歧义。考虑输出*A*B*。这两棵树中的哪棵产生了该输出?
*A*B*
B / \ A * / \ * * A / \ * B / \ * *