یاس
12-01-2008, 11:23 AM
int BSTSearch ( node * T , int * x )
{
int founded = 0 ;
if ( T )
{
if ( T → data < x )
founded = BSTSearch ( T → Right , x ) ;
else if ( T → data > x )
founded = BSTSearch ( T → Left , x ) ;
else founded = 1 ;
}
return founded ;
}
{
int founded = 0 ;
if ( T )
{
if ( T → data < x )
founded = BSTSearch ( T → Right , x ) ;
else if ( T → data > x )
founded = BSTSearch ( T → Left , x ) ;
else founded = 1 ;
}
return founded ;
}