1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
int main()
{
btree.Insertnode("deniz", 6000);
btree.Insertnode("deniz", 200);
btree.Insertnode("deniz", 300);
btree.Insertnode("deniz", 100);
btree.Insertnode("deniz", 250);
btree.Insertnode("deniz", 400);
btree.Insertnode("deniz", 350);
btree.Insertnode("deniz", 50);
btree.Insertnode("deniz", 10);
btree.Insertnode("deniz", 500);
btree.Insertnode("deniz", 450);
btree.Insertnode("deniz", 600);
btree.Insertnode("deniz", 150);
btree.Insertnode("deniz", 130);
btree.Insertnode("deniz", 180);
btree.Insertnode("deniz", 80);
Bnode *result2 = btree.maxNode(btree.proot);
Bnode *result1 = btree.minNode(btree.proot);
cout << "max:"<< result1->val.no << endl;
cout << "min:"<< result2->val.no << endl;
return 0;
}
|