Solution Review: Finding Minimum Value in a Binary Search Tree
Find a detailed analysis of the different ways to solve the “Finding Minimum Value in Binary Search Tree” challenge.
We'll cover the following...
We'll cover the following...
Solution #1: Iterative findMin() #
This solution first checks if the given root is null and returns -1 if it is (lines 10-11). Then, you move on to the left-subtree. Keep going to each node’s left child until the leftmost child is found (lines 13-16).
Time complexity
The time complexity of this solution is in ...