Bibeknam / algorithmtutorprograms

Program Codes for AlgorithmTutor.Com
https://algorithmtutor.com
160 stars 150 forks source link

Implementations error #7

Open ashwin-git-s opened 4 years ago

ashwin-git-s commented 4 years ago

This line if code checks only the right child colour. It should check the left child as well.

https://github.com/Bibeknam/algorithmtutorprograms/blob/705130fc0c5fb5c6bdc53967aea7de644e9bb2c5/data-structures/red-black-trees/RedBlackTree.cpp#L115

elor commented 3 years ago

This fixes a rare segfault during deleteNode (~1 in 10,000 deletions).

Thanks!