Beispiel #1
0
                public Enumerator(SmallDictionary <K, V> dict) : this()
                {
                    var root = dict._root;

                    if (root != null)
                    {
                        // left == right only if both are nulls
                        if (root.Left == root.Right)
                        {
                            _next = root;
                        }
                        else
                        {
                            _stack = new Stack <AvlNode>(dict.HeightApprox());
                            _stack.Push(root);
                        }
                    }
                }