GoalScope — run_length_encode (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
<code>↵ def run_length_encode(s):↵ """Encodes a string using run-length encoding."""↵ if not s:↵ return ""↵ encoded = []↵ count = 1 char = s[0]↵ for i in range(1, len(s)):↵ if s[i] == char:↵ count += 1 else:↵ encoded.append(char + str(count))↵ char = s[i]↵ count = 1 encoded.append(char + str(count))↵ return ''.join(encoded)↵ </code>