BiThrTree Search ( BiThrTree head,elemtype x ) |
{ /*在以head 为头结点的中序线索二叉树中查找值为x 的结点*/ |
BiThrTree p; |
p=head->lchild; |
while ( p->ltag==0&&p!=head ) p=p->lchild; |
while ( p!=head && p->data!=x ) p=InPostNode ( p ); |
if ( p==head ) |
{ |
printf ( “Not Found the data!\n” ); |
return ( 0 ); |
} |
else return ( p ); |
} |