我想遍历二叉搜索树与follwoing代码和我的递归只是照顾右侧如果树,我明白了为什么但我该怎么做才能改善这里的逻辑?遍历二叉搜索树
public void Print() {
Console.WriteLine(this.Value + " ");
if (this.Right != null) {
this.Right.Print();
}
if (this.Left != null) {
this.Left.Print();
}
Console.Read();
}
这里是否存在特定错误?另外,你为什么要在你的印刷品中阅读内容? – Jodaka