mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
docs: fix minor typos in data_structures/avl_tree.c
(#1218)
This commit is contained in:
parent
2d505ccf13
commit
521db035ca
@ -169,12 +169,12 @@ avlNode *delete (avlNode *node, int queryNum)
|
|||||||
delete (node->right, queryNum); /*Recursive deletion in R subtree*/
|
delete (node->right, queryNum); /*Recursive deletion in R subtree*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*Single or No Child*/
|
/*Single or No Children*/
|
||||||
if ((node->left == NULL) || (node->right == NULL))
|
if ((node->left == NULL) || (node->right == NULL))
|
||||||
{
|
{
|
||||||
avlNode *temp = node->left ? node->left : node->right;
|
avlNode *temp = node->left ? node->left : node->right;
|
||||||
|
|
||||||
/* No Child*/
|
/* No Children*/
|
||||||
if (temp == NULL)
|
if (temp == NULL)
|
||||||
{
|
{
|
||||||
temp = node;
|
temp = node;
|
||||||
@ -187,7 +187,7 @@ avlNode *delete (avlNode *node, int queryNum)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*Two Child*/
|
/*Two Children*/
|
||||||
|
|
||||||
/*Get the smallest key in the R subtree*/
|
/*Get the smallest key in the R subtree*/
|
||||||
avlNode *temp = minNode(node->right);
|
avlNode *temp = minNode(node->right);
|
||||||
|
Loading…
Reference in New Issue
Block a user