Challenge: Find Min

Let’s find the minimum value in a BST.

Problem

Find the node with the minimum value.

Input

A BST.

Output

Return a node with the minimum value.

Sample input

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.