我想执行二叉树的级别顺序遍历.因此,对于给定的树,请说:
3 / \ 2 1 / \ \ 4 6 10
输出将是:
3 2 1 4 6 10
我知道我可以使用某种队列,但是在C中递归执行此算法的算法是什么?任何帮助赞赏.
c algorithm binary-tree
algorithm ×1
binary-tree ×1
c ×1