74: Minimum value in a binary search tree

Given a binary search tree, return the minimum value. Return -1 if there is no minimum value.

 

Example 1

Input:        4  
             / \
            2   5

Output: 2

Example 2

Input:     1  
            \  
             3 

Output: 1
Difficulty:Easy
Topic:Tree
Problem #:74