File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export {default as predecessor} from './family/predecessor.js';
1818export { default as sibling } from './family/sibling.js' ;
1919export { default as uncle } from './family/uncle.js' ;
2020export { default as insert } from './insertion/insert.js' ;
21- export { default as insert_case1 } from './insertion/insert_case1 .js' ;
21+ export { default as insert_case0 } from './insertion/insert_case0 .js' ;
2222export { default as insert_case2 } from './insertion/insert_case2.js' ;
2323export { default as insert_case3 } from './insertion/insert_case3.js' ;
2424export { default as insert_case4 } from './insertion/insert_case4.js' ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import Node from '../types/Node.js';
1010 * search tree.
1111 * For our red-black tree, all that is left to do is fix the red-black tree
1212 * properties in case they have been violated by this insertion. This is fixed
13- * by {@link insert_case1 }.
13+ * by {@link insert_case0 }.
1414 *
1515 * @param {Function } compare - The comparison function to use.
1616 * @param {Node } A - The root of the tree.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import insert_case2 from './insert_case2.js';
1111 *
1212 * @param {Node } n - The input node.
1313 */
14- const insert_case1 = ( n ) => {
14+ const insert_case0 = ( n ) => {
1515 assert ( n instanceof Node ) ;
1616 assert ( n . _color === RED ) ;
1717 assert ( n . left . _color === BLACK ) ;
@@ -27,4 +27,4 @@ const insert_case1 = (n) => {
2727 else insert_case2 ( n ) ;
2828} ;
2929
30- export default insert_case1 ;
30+ export default insert_case0 ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import BLACK from '../color/BLACK.js';
44import RED from '../color/RED.js' ;
55import uncle from '../family/uncle.js' ;
66import grandparent from '../family/grandparent.js' ;
7- import insert_case1 from './insert_case1 .js' ;
7+ import insert_case0 from './insert_case0 .js' ;
88import insert_case4 from './insert_case4.js' ;
99
1010/**
@@ -28,7 +28,7 @@ const insert_case3 = (n) => {
2828 /**
2929 * If n has a non-leaf uncle and this uncle is red then we simply
3030 * repaint the parent and the uncle of n in black, the grandparent of
31- * n in red, then call insert_case1 on n's grandparent.
31+ * n in red, then call insert_case0 on n's grandparent.
3232 *
3333 * B >R
3434 * / \ / \
@@ -44,7 +44,7 @@ const insert_case3 = (n) => {
4444 u . _color = BLACK ;
4545 const g = grandparent ( n ) ;
4646 g . _color = RED ;
47- insert_case1 ( g ) ;
47+ insert_case0 ( g ) ;
4848 } else insert_case4 ( n ) ;
4949} ;
5050
You can’t perform that action at this time.
0 commit comments