提出一种新的由一棵严格二叉树的后序序列和结点的双亲情况构造该严格二叉树的非递归算法。通过实例说明该算法的执行过程,假设n是严格二叉树的结点的个数,该算法的时间复杂度和最差情况空间复杂度都是O(n)。
A new non-recursive algorithm is presented for constructing a strictly binary tree from its post-or-der traversal and the parent of each node. The execution of the algorithm is illustrated by an example. Let n be the number of nodes of a strictly binary tree. The time complexity and the worst case space complexity of the algorithm are both O(n).