利用了树的中序遍历,不过是从右边到左边的中序遍历。
打印树#include <iostream.h>
打印树#include 
"tree.h"
打印树
打印树template
<class NODETYPE>
打印树
void outputTree(TreeNode<NODETYPE> *ptr,int totalSpaces)
}
             
运行结果:
              99
          97
               92
     83
               72
          71
               69
49
               44
          40
               32
     28
               19
          18
               11

相关文章:

  • 2021-11-24
  • 2021-11-28
  • 2021-12-30
  • 2021-10-18
  • 2021-12-24
  • 2022-12-23
猜你喜欢
  • 2021-10-01
  • 2022-03-04
  • 2021-06-16
  • 2022-01-03
  • 2022-12-23
相关资源
相似解决方案