Is there a built-in Binary Search Tree in .NET 4.0?

I think the SortedSet<T> class in System.Collections.Generic is what you’re looking for.

From this CodeProject article:

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.

Source code https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/SortedSet.cs

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)