创建二叉树,先序遍历、中序遍历、后序遍历二叉树,求二叉树的深度,求叶子结点个数,求结点个数(C++)
#include#include#includeusingnamespacestd;//abd#g###ce##fh###//树结点structTreeNode{TreeNode*lChild;chardata;TreeNode*rChild;};//二叉树类classBinaryTree{public:BinaryTree(){this->root=NULL;}voidcreateBinary