human
Write me a code to find maximum ( or minimum ) in Binary Tree and the other steps required given the following:
Find maximum ( or minimum ) in Binary Tree | Returns the min value in a binary tree"
How can the above be solved in Python?
assistant
#Here is code to find maximum ( or minimum ) in Binary Tree and the other steps required.
 def find_min_in_BT ( root ) :
	if root is None :
		return float ( ' inf ' )
	res = root . data
	lres = find_min_in_BT ( root . leftChild )
	rres = find_min_in_BT ( root . rightChild )
	if lres < res :
		res = lres
	if rres < res :
		res = rres
	return res