We don’t a开发者_如何学Cllow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI'm looking for a well tested simple in-memory binary tree implementation for c#. I would appreciate any pointers...
The .NET framework already contains them, they are just not advertised as such. Probably because of the inherent ambiguity in the three different ways to iterate a tree. SortedDictionary uses a self-balancing red-black tree under the hood and has the same time and space complexity as a binary tree. You'll need SortedList if your tree contains duplicates.
How about this article on MSDN? (An Extensive Examination of Data Structures Using C# 2.0 ).
Here is a very well tested one: SortedList
You could try this implementation found at CodeProject. Has worked for me.
精彩评论