A C# collection, which behaves like C++ set or priority_queue?
I have written the Dijkstra's algorithm many times in C++ - I need there set or priotity_queue, both give me possibility to add an element and find the least one (using specified comparator). Now, I've got a problem when trying to write Dijkstra in C# - is ther开发者_开发百科e any structure which could be useful for me? I need adding and finding or erasing the least element.
Using Visual Studio '08
You can use SortedSet
if you use a more recent .NET Framework version.
精彩评论