【强化练习】利用后序位置解题 I
原创约 7971 字
Prerequisites
Before reading this article, you need to learn:
For some problems, if you approach them intuitively, you might find that you need to call other recursive functions within your recursive code to calculate subtree information. Generally, when this happens, you can consider optimizing your algorithm using post-order traversal thinking. By using post-order traversal, you can pass subtree information, avoiding high time complexity.