Skip to content

Commit 51af356

Browse files
authored
Rename Red Black Tree (Insertion and Deletion operation).cpp to red_black_tree_insertion_and_deletion.cpp
1 parent 6be80a9 commit 51af356

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data Structures/Trees/Red Black Tree (Insertion and Deletion operation).cpp renamed to Data Structures/Trees/red_black_tree_insertion_and_deletion.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class RBTree {
8686
}
8787
else {
8888
if (s->right->color == 0) {
89-
// x ’s sibling S is black, S's left child is red, and S's right child is black.
89+
// x ’s sibling S is black, S's left child is red, and S's right child is black.
9090
s->left->color = 0;
9191
s->color = 1;
9292
rightRotate(s);
@@ -119,7 +119,7 @@ class RBTree {
119119
}
120120
else {
121121
if (s->left->color == 0) {
122-
// x ’s sibling S is black, S's left child is red, and S's right child is black.
122+
// x ’s sibling S is black, S's left child is red, and S's right child is black.
123123
s->right->color = 0;
124124
s->color = 1;
125125
leftRotate(s);
@@ -688,4 +688,4 @@ Time Complexity for Printing the tree : O(n), where n is the number of nodes in
688688
Time Complexity for the functions rightRotate and leftRotate : O(1) ; since the rotation is at a single node
689689
Space Complexity for Insertion in the Red Black Tree tree : O(n), where n is the number of nodes in the tree
690690
Space Complexity for Deletion in the Red Black Tree tree : O(n), where n is the number of nodes in the tree
691-
*/
691+
*/

0 commit comments

Comments
 (0)