第二题初步完成
This commit is contained in:
+3
-2
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user