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