Archive for the ‘BST’ Category

TREES

April 1, 2008

HOME Definition of a Tree: A tree is a set of one or more nodes T such that: (i).There is a specially designated node called a root (ii).The remaining nodes are partitioned into n disjointed set of nodes T1, T2,…,Tn, each of which is a tree. Degree of a Node of a Tree: The degree [...]

BINARY_SEARCH_TREE

March 27, 2008

HOME /*PROGRAM TO IMPLEMENT BINARY SEARCH TREE*/ #include<iostream.h> #include<conio.h> class tree; class stack  //CLASS DECLARATION {     tree* pointer;     stack *top; public:     stack()     {         top=NULL;     }     void push(tree* i)     {         stack *p;         p= new stack;         p->pointer =i;         p->top = [...]

Follow

Get every new post delivered to your Inbox.