File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export default class RedBlackTree {
108108 *
109109 * @param {Node } node - The input node to delete.
110110 */
111- _delete ( node ) {
111+ unlink ( node ) {
112112 assert ( node instanceof Node ) ;
113113 if ( node . left !== null ) {
114114 // Swap node with its predecessor
@@ -191,7 +191,7 @@ export default class RedBlackTree {
191191 /**
192192 * Search for the first node of the tree whose key equals the input key
193193 * (with {@link RedBlackTree#_search}), then delete that node
194- * (with {@link RedBlackTree#_delete }). If such a node is found and deleted
194+ * (with {@link RedBlackTree#unlink }). If such a node is found and deleted
195195 * then return <code>true</code>. Return <code>false</code> otherwise.
196196 *
197197 * @param {any } key - The input key.
@@ -201,7 +201,7 @@ export default class RedBlackTree {
201201 const node = this . _search ( key ) ;
202202 if ( node === null ) return false ;
203203
204- this . _delete ( node ) ;
204+ this . unlink ( node ) ;
205205 return true ;
206206 }
207207
You can’t perform that action at this time.
0 commit comments