GoalScope — flatten_tree_to_linked_list (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
<code>↵ def flatten_tree_to_linked_list(root):↵ """Flatten a binary tree to a linked list in-place in preorder."""↵ if not root:↵ return stack = [root]↵ while stack:↵ node = stack.pop()↵ if node.right:↵ stack.append(node.right)↵ if node.left:↵ stack.append(node.left)↵ node.left = None node.right = stack[-1] if stack else None</code>