docs: fix minor typos in `data_structures/avl_tree.c` (#1218)

This commit is contained in:
wtz 2023-02-21 06:19:47 +08:00 committed by GitHub
parent 2d505ccf13
commit 521db035ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -169,12 +169,12 @@ avlNode *delete (avlNode *node, int queryNum)
delete (node->right, queryNum); /*Recursive deletion in R subtree*/
else
{
/*Single or No Child*/
/*Single or No Children*/
if ((node->left == NULL) || (node->right == NULL))
{
avlNode *temp = node->left ? node->left : node->right;
/* No Child*/
/* No Children*/
if (temp == NULL)
{
temp = node;
@ -187,7 +187,7 @@ avlNode *delete (avlNode *node, int queryNum)
}
else
{
/*Two Child*/
/*Two Children*/
/*Get the smallest key in the R subtree*/
avlNode *temp = minNode(node->right);