659
1 Like

DSA Crash Course [Part 47] - Tree Min Value Approach

In this lesson, Alvin explores the strategy to solving the following interview problem:

Write a function, tree_min_value, that takes in the root of a binary tree that contains number values.

The function should return the minimum value within the tree.

You may assume that the input tree is non-empty.

a = Node(3)
b = Node(11)
c = Node(4)
d = Node(4)
e = Node(-2)
f = Node(1)
a.left