public static void main(String args[])
	{
		BinarySearchTreeST<String, Integer> st;
		st = new BinarySearchTreeST<String, Integer>();

		String pool[] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
				"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V",
				"W", "X", "Y", "Z" };

		Random r = new Random();
		for (int i = 1; i <= pool.length; i++)
		{
			String key = pool[r.nextInt(pool.length)];
			st.put(key, i);
		}

		System.out.println("Testing min(), max(), size(), height()");
		System.out.println("Min = " + st.min());
		System.out.println("Max = " + st.max());
		assert (st.size() == st.size());
		System.out.println("Size = " + st.size());
		assert (st.height() == st.height());
		System.out.println("Height = " + st.height());

		System.out
				.println("\nTesting keys(), put(), get(), rank(), select(), ceiling(), floor()");
		System.out.println("Key\tValue\tRank\tSelect\tFloor\tCeiling");
		System.out.println("----------------------------------------");
		for (int i = 0; i < pool.length; i++)
		{
			System.out.println(pool[i] + "\t" + st.get(pool[i]) + "\t"
					+ st.rank(pool[i]) + "\t" + st.select(st.rank(pool[i]))
					+ "\t" + st.floor(pool[i]) + "\t" + st.ceiling(pool[i]));
		}

		System.out.print("\nTesting deleteMax() on ");
		for (String s : st.keys())
			System.out.print(s);
		System.out.println();
		while (st.size() != 0)
		{
			st.deleteMax();
			System.out.print("keys : ");
			for (String s : st.keys())
				System.out.print(s);
			System.out.println();
		}

		for (int i = 1; i <= pool.length; i++)
		{
			String key = pool[r.nextInt(pool.length)];
			st.put(key, i);
		}
		System.out.print("\nTesting deleteMin() on ");
		for (String s : st.keys())
			System.out.print(s);
		System.out.println();
		while (st.size() != 0)
		{
			st.deleteMin();
			System.out.print("keys : ");
			for (String s : st.keys())
				System.out.print(s);
			System.out.println();
		}

		for (int i = 1; i <= pool.length; i++)
		{
			String key = pool[r.nextInt(pool.length)];
			st.put(key, i);
		}
		System.out.print("\nTesting delete() on ");
		for (String s : st.keys())
			System.out.print(s);
		System.out.println();
		while (st.size() != 0)
		{
			String key = st.select(r.nextInt(st.size()));
			st.delete(key);
			System.out.print("After deleting " + key + ": ");
			for (String s : st.keys())
				System.out.print(s);
			System.out.println();
		}
		// st.printTree();
	}