@@ -5,7 +5,7 @@ import RED from '../color/RED.js';
55import rotate_left from '../rotate/rotate_left.js' ;
66import rotate_right from '../rotate/rotate_right.js' ;
77import grandparent from '../family/grandparent.js' ;
8- import insert_case5 from './insert_case5 .js' ;
8+ import insert_case4 from './insert_case4 .js' ;
99
1010/**
1111 * Preconditions:
@@ -15,7 +15,7 @@ import insert_case5 from './insert_case5.js';
1515 * - n's parent is red.
1616 * - n's uncle is black.
1717 *
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 }.
1919 *
2020 * @param {Node } n - The input node.
2121 */
@@ -30,7 +30,7 @@ const insert_case3 = (n) => {
3030
3131 /**
3232 * 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
3434 * parent of n.
3535 *
3636 * B B
@@ -60,7 +60,7 @@ const insert_case3 = (n) => {
6060 } else if ( n === n . parent . left && n . parent === g . right ) {
6161 /**
6262 * 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
6464 * parent of n.
6565 *
6666 * B B
@@ -86,7 +86,7 @@ const insert_case3 = (n) => {
8686 // n = n.right ;
8787 }
8888
89- insert_case5 ( n ) ;
89+ insert_case4 ( n ) ;
9090} ;
9191
9292export default insert_case3 ;
0 commit comments