.NET 4.0 中是否有内置的二叉搜索树,或者我是否需要从头开始构建这种抽象数据类型?
编辑
这是专门针对二叉搜索树的,而不是一般的抽象数据类型“树”。
最佳答案
我认为 SortedSet<T>
在 System.Collections.Generic
中上课正是您要找的。p>
It is implemented using a self-balancing red-black tree that gives a performance complexity of O(log n) for insert, delete, and lookup. It is used to keep the elements in sorted order, to get the subset of elements in a particular range, or to get the Min or Max element of the set.
关于c# - .NET 4.0 中是否有内置的二叉搜索树?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3262947/