Created
January 1, 2021 07:34
-
-
Save hsnice16/fb475a4e4f4f03ed7293ad06fdb615ba to your computer and use it in GitHub Desktop.
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
// c++ | |
if (curr->key > el) // curr is a variable maintaining current node(already present in tree) | |
// with which comparison is taking place | |
// And, el is new key we have to insert | |
{ | |
successor = curr; // successor only contain value if new node | |
// goes in left subtree of curr node | |
curr = curr->left; // go left subtree | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment