-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTree.h
51 lines (41 loc) · 1.07 KB
/
Tree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//Defining the class Trees to be implemented in BSTrees and AVL Trees
//Uses Dictionary as the storage data structure
#ifndef tree
#define tree
#include"Dictionary.h"
class Tree: public Dictionary{
private:
Tree *left=nullptr; //child nodes
Tree *right=nullptr; //child nodes
Tree *parent=nullptr; //parent node
public:
Tree(): Dictionary(-1,-1,-1){
this->left = nullptr;
this->right = nullptr;
this->parent = nullptr;
}
Tree(int address , int size, int key):Dictionary(address, size, key){
this->left=nullptr;
this->right = nullptr;
this->parent=nullptr;
}
Tree *Insert(int address,int size, int key ){
return nullptr;
};
bool Delete(Dictionary *d){
return false;
}
Tree *Find(int key, bool exact){
return nullptr;
}
Tree *getFirst(){
return nullptr;
}
Tree *getNext(){
return nullptr;
}
bool sanity(){
return false;
}
};
#endif