🔎 CRUXEval Sample Explorer 🔎

CRUXEval is a benchmark complementary to HumanEval and MBPP measuring code reasoning, understanding, and execution capabilities!


   
def f(text, char):
    index = text.rindex(char)
    result = list(text)
    while index > 0:
        result[index] = result[index-1]
        result[index-1] = char
        index -= 2
    return ''.join(result)
assert f('qpfi jzm', 'j') == 'jqjfj zm'
CRUXEval-I
assert f(??) == 'jqjfj zm'

CRUXEval-O
assert f('qpfi jzm', 'j') == ??