as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
given a binary tree, check if it is a binary search tree?
user
def isbst(root):
if root is none : 
	return true

if root.left is not none and root.left.val > root.val: 
	return false

if root.right is not none and root.right.val < root.val: 
	return false

return isbst(root.left) and isbst(root.right)
assistant