
Non-Linear Data Structure 549
if(ele<pstr->number)
pstr=pstr->ls;
else pstr=*pstr->rs;
}
*lc= 0 , *p_r=p_save;
return 0;
ins_item(int ele)
{ struct b t r e e ♦temp, * father, ^position;
search (ele, &father,&position);
if(positionlsO)
{
puts ("Item already e x ist ");
return 0;
}
tecopa (struct b tree *) malloc (sizeof (struct b tree));
temp- >nuDDber»ele;
tenp->ls«0;
tenp->rs=0;
if(fa th e rs s O )
r_node*tenp;
else
i f (ele< father->nunber)
father->ls» temp;
else
father->rs» temp;
return 0;
}
dal_itern (int ele)
{
struct b t r e e * father, ^position;
int a (struct b_tree*, struct b tree * );
int b(struct b tree*,struct b tree * );
int c (st