A modern C# / WPF application that lets you visualize basic operations on BST and AVL trees.
Supports:
- Insertion
- Deletion
- Search
All steps performed during an algorithm's execution are described in the log, and all the nodes associated with the particular sub-operation are highlighted - which enables clear and easy following of an algorithm.
Additionally, the amount of performed comparisons and traversals is recorded and can be viewed in form of a graph (utilizes ScottPlott library):
This allows one to verify the algorithms' time complexity with real-world data.
- Use "Insert 20 items" button to insert twenty random items into the tree instantly. Count can be decreased / increased with
F2
andF3
keys respectively. - Press
Escape
to cancel the current animation and proceed to the final result instantly - Press
Enter
to repeat the last operation - Click a node to quickly select it
- Graph's data updates instantly as you perform new operations
- The tree is auto-layouted using a modified Wetherell and Shannon algorithm for visually pleasant and efficient use of space
Uses .NET 9.0 and C# 13 preview with WPF UI. To build with Visual Studio 2022.
Utilizes Material Design NuGet package for the interface theme, as well as ScottPlot library for rendering the collected performance data into graphs.
The interface is connected to the logical binary tree with a composite model, where BinTree<T>
and Node<T>
manage their respective BinTreeControl
and BinTreeNode
WPF controls, respectively.