Could any one point me to a good,simple implementation of red-black trees in c++ , which i can use in competitive coding as a general balanced binary tree. I am not particularly looking for template based implementations. Simple implementations with integer nodes(STRUCT) would do.
Hm, I’ve thought of that. Could you please elaborate on the same…
I know i can give my own comparator function for a set.
Will I be able to modify the insert,search,delete operations to augment the structure? (as in an interval tree lets say)
The search,insert and delete operations will take place depending upon how you’ve implemented the comparator function.I don’t think we can augment a set or map using STL.I’d suggest using a skiplist.Which is very easy to implement as compared to a red-black tree.