Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- struct node
- {
- int T;
- node *LEFT;
- node *RIGHT;
- };
- void insert( node *&root, int k ){
- if (root!= NULL){
- insert (root, k);
- }
- else{
- root = new node;
- root -> T = k;
- root->LEFT = NULL;
- root->RIGHT = NULL;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement