https://leetcode.cn/problems/binary-tree-inorder-traversal/
2. 解题代码
public class Solution {
public IList InorderTraversal(TreeNode root)
{
IList listResult = new List();
AddData2Node(root, listResult);
return listResult;
}
private void AddData2Node(TreeNode root, IList listResult)
{
if (root == null)
{
return;
}
if (root.left != null)
{
AddData2Node(root.left, listResult);
}
listResult.Add(root.val);
if (root.right != null)
{
AddData2Node(root.right, listResult);
}
}
}



