c++通过递归和栈实现二叉树 中序、先序、后序遍历
#include <utility>
#include <iostream>
#include <stack>
using namespace std;
struct BinaryTreeNode
{
int m_nValue;
BinaryTreeNode *m_pLeft;
BinaryTreeNode *m_pRight;
};
//添加节点
void addNode(BinaryTreeNode **rootNode, int valu
原创
2020-12-19 17:59:25 ·
235 阅读 ·
1 评论