Skip to content
Advertisement

Is it possible to avoid duplicate values from being inserted in a Red Black Tree?

This is currently my code for insertion in a Red Black tree. How would I make it so that duplicate values are not added in so that the tree doesn’t change?

JavaScript

Advertisement

Answer

Something like this

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement