Implementation

The implementation of the AVL trees, including various rotations necessary to keep the balanced state of a tree, seems to be quite complicated. Fortunately, you do not need to create its implementation from scratch, because you can use one of the available NuGet packages, such as Adjunct, which will be used for creating our example.

The package provides developers with a few classes that can be used while creating C#-based applications. Let's focus on the AvlTree generic class, which represents an AVL tree. The class is very simple to use, so you do not need to know ...

Get C# Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.