MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / remove

Method remove

Data-Structures/Tree/AVLTree.js:77–81  ·  view source on GitHub ↗

* * @param {any} _val * It is possible that element doesn't exists in tree * in that case it return false * @returns {Boolean} if element was found and deleted

(_val)

Source from the content-addressed store, hash-verified

75 * @returns {Boolean} if element was found and deleted
76 */
77 remove(_val) {
78 const prevSize = this.size
79 this.root = deleteElement(this.root, _val, this)
80 return prevSize !== this.size
81 }
82}
83
84// creates new Node Object

Callers

nothing calls this directly

Calls 1

deleteElementFunction · 0.85

Tested by

no test coverage detected