GoalScope — is_bst (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def is_bst(root):↵
"""Helper function to validate BST."""↵
def validate(node, low=float(\'-inf\'), high=float(\'inf\')):↵
if not node:↵
return True↵
if node.val <= low or node.val >= high:↵
return False↵
return (validate(node.left, low, node.val) and↵
validate(node.right, node.val, high))↵
return validate(root)↵
</code>