🔎 CRUXEval Sample Explorer 🔎

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


   
def f(dic, value):
    result = []
    for e in dic:
        result.append(e[0])
        if e[1] == value:
            result.reverse()
        else:
            result.append(e[1])
    return result
assert f({'9m':2, 'mA':1, '10K':2, 'Lk':2}, 1) == ['9', 'm', 'm', 'A', '1', '0', 'L', 'k']
CRUXEval-I
assert f(??) == ['9', 'm', 'm', 'A', '1', '0', 'L', 'k']

CRUXEval-O
assert f({'9m':2, 'mA':1, '10K':2, 'Lk':2}, 1) == ??