🔎 CRUXEval Sample Explorer 🔎

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


   
def f(nums):
    output = []
    for n in nums:
        output.append((nums.count(n), n))
    output.sort(reverse=True)
    return output
assert f([1, 1, 3, 1, 3, 1]) == [(4, 1), (4, 1), (4, 1), (4, 1), (2, 3), (2, 3)]
CRUXEval-I
assert f(??) == [(4, 1), (4, 1), (4, 1), (4, 1), (2, 3), (2, 3)]

CRUXEval-O
assert f([1, 1, 3, 1, 3, 1]) == ??