O'Reilly logo

C# Data Structures and Algorithms by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementation

If you want to use an RBT in your application, you can either implement it from scratch or use one of the available libraries, such as TreeLib, which you can easily install using the NuGet Package Manager. This library supports a few kinds of trees, among which the RBTs exist.

You can find more information about the library at http://programmatom.github.io/TreeLib/ and https://www.nuget.org/packages/TreeLib.

As the library provides developers with many classes, it is a good idea to take a look at those related to RBTs. The first class is named RedBlackTreeList and represents an RBT. It is a generic class, so you can easily specify a type of data stored in each node.

The class contains a set of methods, including Add for inserting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required