Esempio n. 1
0
 //���ֱ������ķ�ʽ
 /// <summary>
 /// �������
 /// </summary>
 /// <param name="theRoot"></param>
 public void InOrder(Node theRoot)
 {
     if (theRoot !=null)
     {
         InOrder(theRoot.Left);
         theRoot.DisplayNode();
         InOrder(theRoot.Right);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// �������
 /// </summary>
 /// <param name="theRoot"></param>
 public void PreOrder(Node theRoot)
 {
     if (theRoot != null)
     {
         theRoot.DisplayNode();
         PreOrder(theRoot.Left);
         PreOrder(theRoot.Right);
     }
 }