-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
63 lines (56 loc) · 1.15 KB
/
main.cpp
File metadata and controls
63 lines (56 loc) · 1.15 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
#include <bits/stdc++.h>
using namespace std;
class node{
private:
int data;
node *parent;
node *right;
node *left;
public:
int getData(){
return data;
}
void setData(int data){
this->data = data;
}
node * getParent(){
return parent;
}
void setParent(node * parent){
this->parent = parent;
}
node * getRight(){
return right;
}
void setRight(node * right){
this->right = right;
}
node * getLeft(){
return left;
}
void setLeft(node * left){
this->left = left;
}
};
class Binary_Search_Tree{
private:
node* root;
int size;
public:
int getSize(){
return size;
}
Binary_Search_Tree(){
root = nullptr;
size = 0;
}
~Binary_Search_Tree();
void insert(int data);
void remove(int data);
node *find(int data);
//search about bfs
void print();
};
int main(){
return 0;
}