28 lines
391 B
C++
28 lines
391 B
C++
#ifndef BITREE_H
|
|
#define BITREE_H
|
|
|
|
#include<sstream>
|
|
|
|
|
|
class BiTree {
|
|
public:
|
|
int data;
|
|
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);
|
|
|
|
std::string toString();
|
|
};
|
|
|
|
|
|
#endif //BITREE_H
|