Skip to content

Instantly share code, notes, and snippets.

Avatar

Hakob Grigoryan hflexgrig

  • Armenia, Yerevan
View GitHub Profile
@hflexgrig
hflexgrig / RedBlackTree.cs
Last active February 21, 2021 08:05 — forked from JamesRandall/RedBlackTree.cs
Red-Black Tree Implementation in C#
View RedBlackTree.cs
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace OpinionatedCode.Collections
{
public sealed class RedBlackTree<TKey, TValue> : IEnumerable<KeyValuePair<TKey,TValue>>
{
private readonly RedBlackTreeNode<TKey, TValue> _leaf = RedBlackTreeNode<TKey, TValue>.CreateLeaf();