二叉树的后序遍历
func postorderTraversal(root *TreeNode) []int {
res := []int{}
var help func(root *TreeNode)
help = func(root *TreeNode) {
if root == nil {
return
}
help(root.Left)
help(root.Right)
res = append(res, root.Val)
}
help(root)
return res
}