keon / algorithms

Minimal examples of data structures and algorithms in Python
MIT License
23.77k stars 4.59k forks source link

Added "TestRBTree", fixed some bugs in RBTree. #874

Closed izveigor closed 1 year ago

izveigor commented 1 year ago

Added test for red black tree. Test checks following methods: minimum, maximum, insert, delete, inorder. Argument "color" of RBNode now has default value 1. Fixed bug, now tree can delete the last node.