So this is my code below, my thought process is that if the smallest value in the tree is less than the root and the largest value in the tree is greater than the root it should check if the BST is valid
def min(self):
while self.left:
self.root = self.left
return self.root
def max(self):
while self.right:
self.root = self.right
return self.value
def valid(self):
min = min(self.left)
max = max(self.right)
if self.root > min and self.root < max:
return True