Python | Leetcode Python题解之第145题二叉树的后序遍历
题目: 题解: class Solution:def postorderTraversal(self, root: TreeNode) -> List[int]:def addPath(node: TreeNode):count 0while node:count 1res.append(node.val)node node.righti, j len(res) - count, len(res) - 1while i < j:res…
2026-01-02