Open thestics opened 1 year ago
Thanks for the suggestion! The current implementation is intentionally a multi-set (i.e. it allows duplicate elements). Some of the examples in my algorithms class depend on that, so I'd like to keep it that way. However, if you want to add a second data-structure to the library that acts as a set, that would be totally welcome!
I want to use your implementation for my data structure. In particular set would behave like this:
As you might notice, in this case, the insertion of an already existing Node would just override the existing one, not insert it somewhere else. Do you think this is a useful addition and should I create a PR with that patch, or you're fine with the current implementation?
Cheers!