Skip to content

Instantly share code, notes, and snippets.

@todykuo
Created August 8, 2011 05:15
Show Gist options
  • Save todykuo/1131245 to your computer and use it in GitHub Desktop.
Save todykuo/1131245 to your computer and use it in GitHub Desktop.
gist: 1131149 alternative?
// #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