IT Placement Papers Programming C
This category contains C Interview Questions and Answers |
Write a C program to find the mininum value in a binary search tree.
|
|
|
|
Here is some sample C code. The idea is to keep on moving till you hit the left most node in the tree
int minValue(struct node* node) { struct node* current = node;
while (current->left != NULL) { current = current->left;
} return(current->data); }
Only registered users can write comments. Please login or register.
|