SortedBag <T> for C #
I am looking for a SortedBag implementation for C #, my use case is as follows: I have a series of objects that are evaluated and sorted using a custom implementation of IComparer, the problem is that completely different objects can lead to the same evaluation, and when I try to use sorted ones By default, C # sorts, such as SortedSet, SortedDictionary, I cannot insert multiple objects into these collections with the same rating, because collections consider these objects to be equal and refuse to insert them. I need a SortedBag implementation that has O (log (N)) for insert and delete, since I am doing insert / delete quite actively.
Has anyone stumbled upon such an implementation?
Thanks!
Edit
It seems I was looking for Priority Queue, not SortedBag ...
TreeBag<T> from the C5 collection library must be O(log(n)) both insert and delete, otherwise there is Wintellect Power Collections for .NET with its OrderedBag<T> .