//golang递归

func postorderTraversal( root *TreeNode ) []int {
    // write code here
    res:=make([]int,0)
    postOrder(&res,root)
    return res
}

func postOrder(res *[]int,root *TreeNode){
    if root==nil{
        return
    }
    postOrder(res,root.Left)
    postOrder(res,root.Right)
    *res=append(*res, root.Val)
}