3 ms·
> a complete AVL tree that doesn't use recursion and is a whole lot faster for it! A simple benchmark would've gone a long way here. Edit - also this:
by huhtenberg 8y ago
> a complete AVL tree that doesn't use recursion and is a whole lot faster for it!
A simple benchmark would've gone a long way here.
Edit - also this:
if (_comparer.Compare(key, node.Key) < 0)
{
node = node.Left;
}
else if (_comparer.Compare(key, node.Key) > 0)
{
node = node.Right;
}
needlessly doubles the number of Compare() calls in Delete() and Search(). Insert() however does it right.