https://leetcode-cn.com/problems/binary-tree-inorder-traversal/
Golang
var list []int
func inorderTraversal(root *TreeNode) []int {
list = make([]int, 0)
dfs(root)
return list
}
func dfs(node *TreeNode) {
if node == nil {
return
}
dfs(node.Left)
list = append(list, node.Val)
dfs(node.Right)
}