mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Merge pull request #882 from liushubin-gitHub/main
fix: Insert() does not work issue in binary_search_tree.cpp
This commit is contained in:
commit
98bcc5df71
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user