Пример #1
0
        public static IMemoryPool <Treap <Value> > Clear(Treap <Value> t, IMemoryPool <Treap <Value> > alloc)
        {
            if (t == null)
            {
                return(alloc);
            }

            for (var i = 0; i < 2; i++)
            {
                Clear(t.ch [i], alloc);
            }
            return(alloc.Free(t.Clear()));
        }
Пример #2
0
        public ITreapController <Value> Clear()
        {
            Treap <Value> .Clear(Root, _pool);

            return(this);
        }