@@ -5,7 +5,7 @@ import RED from '../color/RED.js';
5
5
import rotate_left from '../rotate/rotate_left.js' ;
6
6
import rotate_right from '../rotate/rotate_right.js' ;
7
7
import grandparent from '../family/grandparent.js' ;
8
- import insert_case5 from './insert_case5 .js' ;
8
+ import insert_case4 from './insert_case4 .js' ;
9
9
10
10
/**
11
11
* Preconditions:
@@ -15,7 +15,7 @@ import insert_case5 from './insert_case5.js';
15
15
* - n's parent is red.
16
16
* - n's uncle is black.
17
17
*
18
- * Here we fix the input subtree to pass the preconditions of {@link insert_case5 }.
18
+ * Here we fix the input subtree to pass the preconditions of {@link insert_case4 }.
19
19
*
20
20
* @param {Node } n - The input node.
21
21
*/
@@ -30,7 +30,7 @@ const insert_case3 = (n) => {
30
30
31
31
/**
32
32
* If the path from g to n makes a left-right, change it to a left-left
33
- * with {@link rotate_left}. Then call {@link insert_case5 } on the old
33
+ * with {@link rotate_left}. Then call {@link insert_case4 } on the old
34
34
* parent of n.
35
35
*
36
36
* B B
@@ -60,7 +60,7 @@ const insert_case3 = (n) => {
60
60
} else if ( n === n . parent . left && n . parent === g . right ) {
61
61
/**
62
62
* If the path from g to n makes a right-left, change it to a right-right
63
- * with {@link rotate_right}. Then call {@link insert_case5 } on the old
63
+ * with {@link rotate_right}. Then call {@link insert_case4 } on the old
64
64
* parent of n.
65
65
*
66
66
* B B
@@ -86,7 +86,7 @@ const insert_case3 = (n) => {
86
86
// n = n.right ;
87
87
}
88
88
89
- insert_case5 ( n ) ;
89
+ insert_case4 ( n ) ;
90
90
} ;
91
91
92
92
export default insert_case3 ;
0 commit comments