File tree

3 files changed

+1469
-626
lines changed

3 files changed

+1469
-626
lines changed
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Tree:
4040
* `insert(key:)` Inserts the key value into the tree
4141
* `delete(key:)` Delete the node with the respective key value from the tree
4242
* `verify()` Verifies that the given tree fulfills the red-black tree properties
43+
* `count()` Returns how many nodes in the tree
44+
* `isEmpty()` Returns if the tree has no nodes
45+
* `allElements()` Returns an array containing all nodes (in-order traversal) in the tree.
4346

4447
The rotation, insertion and deletion algorithms are implemented based on the pseudo-code provided in [CLRS]
4548

0 commit comments

Comments
 (0)