Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. void Insert(node root, node n) {
  2. if (n.value < root.value) {
  3. if (root.left != null)
  4. Insert(root.left, n);
  5. else
  6. root.left = n;
  7. }
  8. else {
  9. // same thing for right
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement