* Retrieve the highest (right most) value in the binary search tree, or null * if the tree is empty. * * The complexity of this operation depends on the underlying structure of the * tree. Refer to the documentation of the structure itself for more details. * * @example Finding the
()
| 531 | * @returns The maximum value in the binary search tree, or null if the tree is empty. |
| 532 | */ |
| 533 | max(): T | null { |
| 534 | return this.#root ? this.#root.findMaxNode().value : null; |
| 535 | } |
| 536 | |
| 537 | /** |
| 538 | * Remove all values from the binary search tree. |
no test coverage detected