Example #1
0
        public void Delete()
        {
            var heapTree = new HeapTree();

            heapTree.Insert(5);
            heapTree.Insert(6);
            heapTree.Insert(15);
            heapTree.Insert(7);
            heapTree.Insert(12);
            heapTree.Insert(9);
            heapTree.Insert(2);
            heapTree.Insert(54);
            heapTree.Insert(59);
            heapTree.Display();
            heapTree.DeleteRoot();
            heapTree.Display();
            int index = heapTree.Search(54);

            Assert.AreEqual(1, index);
        }