Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node_t *insert_node(node_t *root, node_t *new)
- {
- node_t** curr = &root;
- while (*curr)
- {
- if (strcmp(new->name, (*curr)->name) < 0)
- curr = &(*curr)->left;
- else curr = &(*curr)->right;
- }
- *curr = new;
- return root;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement