Thursday, 2 August 2012

C function to find the mininum value in a binary search tree.

int minValue(struct node* node) 
{ 
struct node* current = node; 

while (current->left != NULL) 
{ 
current = current->left; 
}

return(current->data); 
} 

No comments:

Post a Comment