Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Insert(node root, node n) {
- if (n.value < root.value) {
- if (root.left != null)
- Insert(root.left, n);
- else
- root.left = n;
- }
- else {
- // same thing for right
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement