コード例 #1
0
        public static void DisplayAdvancedHeap()
        {
            AdvancedHeap <char> heap = new AdvancedHeap <char>(
                100,
                (value1, value2) => value2 - value1 < 0
                );

            heap.Insert('A');
            heap.Insert('B');
            heap.Insert('C');

            Console.WriteLine(heap.Delete());

            heap.Insert('A');
            heap.Insert('B');
            heap.Insert('C');

            Console.WriteLine(heap.Delete());

            while (!heap.IsEmpty())
            {
                Console.WriteLine(heap.Delete());
            }
        }
コード例 #2
0
 public bool IsEmpty()
 {
     return(_heap.IsEmpty());
 }