Closed alihossein closed 3 years ago
@alihossein it's intentional, this implementation does not support duplicate keys
, should red-black tree support duplicate keys
?
OK. So duplicate data is allowed in RBTree but you have ignored it in your implementation. it's true?
Not exactly, I think R-B trees are not designed for data structures which support duplicates, but rather sets. So this implementation would not support duplicate keys.
Maybe I should add a clarification to README
Maybe I should add a clarification to README
yes, I think it is better :+1:
thanks for this package .
I think we get into trouble when the key (Expiry) is the same. So only one of the nodes is inserted.
If I changed the condition, all nodes add successfully, but the Get method did not work, and the result is nill!