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.
我正在寻找一种方法或伪代码来查找以后序字符串编写的特定节点的级别(级别排序树中的级别)。我也很欣赏任何将后序字符串转换为级别顺序树的算法。我应该提到我的树包括二元和一元函数。
C C / \ and / A B B / A have the same postorder string: ABC...
但每个节点的级别不同,因此您无法仅从后序遍历排序中确定级别