# Write a function to find the node with minimum value in a Binary Search Tree

Simple logic . Just traverse the node from root to left recursively until left is NULL. The node whose left is NULL is the node with minimum value .

**Code :**

/* Given a non-empty binary search tree, return the minimum data value found . */ int minValue(struct node* node) { struct node* current = node; /* loop down to find the leftmost leaf */ while (current->left != NULL) { current = current->left; } return(current->data); }

**Time Complexity **: O(H) where H is the height of the tree .