Dsa
Binary Search Tree
Warm-up
Find Minimum Value in BST
You are given the root of a binary search tree (BST). Your task is to find and return the minimum value in the BST.
Input Format:
- The first line contains an integer n, the number of nodes in the BST.
- The next n lines each contain a single integer, which represents the value of the node inserted into the BST.
Output Format:
- Print a single integer: the minimum value in the BST.
Example:
Input:
3
10
5
15
Output:
5
Key concepts
binary_search_treemin_value
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now