Find min and max value in a BST

June 28, 2022 · 1 min read

https://practice.geeksforgeeks.org/problems/minimum-element-in-bst/1

int minValue(Node* root) {
    if (root == nullptr) return -1;

    if  (root->left == nullptr) return root->data;

    return minValue(root->left);
}
Find a value in a BST
Find inorder successor and inorder predecessor in a BST