第二题初步完成

This commit is contained in:
2024-11-22 17:16:02 +08:00
parent f8b03bad55
commit 7037512838
4 changed files with 86 additions and 2 deletions
+3 -2
View File
@@ -2,7 +2,6 @@
#define BITREE_H
#include<sstream>
class BiTree
{
public:
@@ -10,13 +9,15 @@ public:
BiTree* left;
BiTree* right;
static bool is_empty(BiTree* bt);
static bool is_leaf(BiTree* bt);
static int sum_leaf(BiTree* bt);
static BiTree* createNode(int data);
static void insertNode(BiTree*& bt, int value);
static BiTree* build_from_preorder_string(const std::string& preorder, size_t& index);
void inOrder(std::ostringstream& oss) const;
std::string toString();
void destory();
};