A user may wish to extend the Node object, or implement the Node interface within a custom object. The RedBlackTree could be made to accept these objects and organize them appropriately. This would allow users to implement more complicated sorting strategies then just a singular int, like sorting against a tuple or a custom function.
One consideration is the delete function. Would the user have to provide the exact object they with to remove, or just a key? I guess both could work.
A user may wish to extend the Node object, or implement the Node interface within a custom object. The RedBlackTree could be made to accept these objects and organize them appropriately. This would allow users to implement more complicated sorting strategies then just a singular int, like sorting against a tuple or a custom function.
One consideration is the delete function. Would the user have to provide the exact object they with to remove, or just a key? I guess both could work.