I'm having trouble finding the right C# data structure. I'm looking for a PriorityList. It needs to have the following:
C#'s SortedList looked promising, but it can't handle inserting at a priority that already exists or removing an element at a given priority (having the list shift appropriately in both cases).
If you just use a standard List<T>
that should give you everything you have asked for if you use priority == index.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With