Shiyu Wang Lec28 April 27th
typedef struct treenode {
struct treenode *left; struct treenode *right; int value;
}Node;
Node* root=NULL;
root=tree_insert(root,13);
root=tree_insert(root,7);
root=tree_insert(root,22);
Node*Tree_insert(Node*n,int v) {
if(n==NULL) { return Node_construct(v); } if((n->value)==v) { return n; } if((n->value)>v) { n->left=Tree_insert(n->left,v); } else { n->right=Tree_insert(n->right,v); } return n;
}