GoalScope — is_samepatterns (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def is_samepatterns(colors, patterns):↵
"""Check if the sequence of colors matches the sequence of patterns."""↵
if len(colors) != len(patterns):↵
return False↵
color_to_pattern = {}↵
pattern_to_color = {}↵
for color, pattern in zip(colors, patterns):↵
if color not in color_to_pattern:↵
color_to_pattern[color] = pattern↵
if pattern not in pattern_to_color:↵
pattern_to_color[pattern] = color↵
if color_to_pattern[color] != pattern or pattern_to_color[pattern] != color:↵
return False↵
return True↵
</code>