void create(Tree &t,int val) {
if (t == nullptr) {
t = new node;
t->data = val;
t->left = t->right = nullptr;
}
else if (val > t->data)
create(t->right, val);
else if (val < t->data)
create(t->left, val);
}
void insert(Tree& t, int a[], int len) {
for (int i = 0;i < len;i++) {
create(t, a[i]);
}
}
int main(){
Tree t=nullptr;
int a[]={1,2,3,4,5,6};
insert(t,a,6);
}