File tree 1 file changed +3
-3
lines changed
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 {
108
108
*
109
109
* @param {Node } node - The input node to delete.
110
110
*/
111
- _delete ( node ) {
111
+ unlink ( node ) {
112
112
assert ( node instanceof Node ) ;
113
113
if ( node . left !== null ) {
114
114
// Swap node with its predecessor
@@ -191,7 +191,7 @@ export default class RedBlackTree {
191
191
/**
192
192
* Search for the first node of the tree whose key equals the input key
193
193
* (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
195
195
* then return <code>true</code>. Return <code>false</code> otherwise.
196
196
*
197
197
* @param {any } key - The input key.
@@ -201,7 +201,7 @@ export default class RedBlackTree {
201
201
const node = this . _search ( key ) ;
202
202
if ( node === null ) return false ;
203
203
204
- this . _delete ( node ) ;
204
+ this . unlink ( node ) ;
205
205
return true ;
206
206
}
207
207
You can’t perform that action at this time.
0 commit comments