Ejemplo n.º 1
0
		public static void Main (string[] args)
		{
			Console.WriteLine ("Hello World!");
			Heap h = new Heap (5);
			h.insert (1);
			h.insert (3);
			h.insert (2);
			h.insert (5);
			h.insert (4);
			Console.WriteLine ("Sorted Elements are :");
			for (int i = 0; i < h.Length(); i++) {
				Console.WriteLine (h.GetValueAtIndex (i).ToString ());
			}
			Console.ReadLine ();
		}
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Heap h = new Heap(5);

            h.insert(1);
            h.insert(3);
            h.insert(2);
            h.insert(5);
            h.insert(4);
            Console.WriteLine("Sorted Elements are :");
            for (int i = 0; i < h.Length(); i++)
            {
                Console.WriteLine(h.GetValueAtIndex(i).ToString());
            }
            Console.ReadLine();
        }