コード例 #1
0
ファイル: BinarySearchTree.cs プロジェクト: ronaldhan/agthex
 //���ֱ������ķ�ʽ
 /// <summary>
 /// �������
 /// </summary>
 /// <param name="theRoot"></param>
 public void InOrder(Node theRoot)
 {
     if (theRoot !=null)
     {
         InOrder(theRoot.Left);
         theRoot.DisplayNode();
         InOrder(theRoot.Right);
     }
 }
コード例 #2
0
ファイル: BinarySearchTree.cs プロジェクト: ronaldhan/agthex
 /// <summary>
 /// �������
 /// </summary>
 /// <param name="theRoot"></param>
 public void PreOrder(Node theRoot)
 {
     if (theRoot != null)
     {
         theRoot.DisplayNode();
         PreOrder(theRoot.Left);
         PreOrder(theRoot.Right);
     }
 }