Advertisement
Guest User

Untitled

a guest
May 1st, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. void insert( node *&tmp, int val_x ) {
  2. if( tmp == NULL ) {
  3. tmp = new node;
  4. tmp -> val = val_x;
  5. return;
  6. }
  7. SOL++;
  8. if( val_x < tmp -> val ) insert( tmp -> left, val_x );
  9. else insert( tmp -> right, val_x );
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement