Merge pull request #882 from liushubin-gitHub/main

fix: Insert() does not work issue  in binary_search_tree.cpp
This commit is contained in:
Krishna Vedala 2020-06-22 22:44:27 -04:00 committed by GitHub
commit 98bcc5df71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ void Insert(node *n, int x) {
temp->val = x;
temp->left = NULL;
temp->right = NULL;
n->left = temp;
n->right = temp;
} else {
Insert(n->right, x);
}