Skip to content

Commit ed423f6

Browse files
authored
Merge pull request kodecocodes#520 from remlostime/rbtree-improve
Improvement of Red Black Tree
2 parents e93f3c6 + 467ac6b commit ed423f6

File tree

3 files changed

+1469
-626
lines changed

3 files changed

+1469
-626
lines changed

Red-Black Tree/README.markdown

Lines changed: 3 additions & 0 deletions
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)