Created
August 8, 2011 05:15
-
-
Save todykuo/1131245 to your computer and use it in GitHub Desktop.
gist: 1131149 alternative?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #3 | |
void add_node(Node *node, Node *new_node) { | |
while( node != NULL ) { | |
if( new_node->value <= node->value ) | |
node = node->left; | |
else | |
node = node->right; | |
} | |
node = new_node; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment