Skip to content
DeepForgeby svx
All problems

Best-Eval Checkpoint Selection

Problem

Return the step of the checkpoint with the highest evaluation score, breaking ties toward the earliest checkpoint. An empty input returns -1.

Hint

The strict comparison keeps the earliest checkpoint when scores tie.

Test cases

case 1
in: [[100,200,300],[1,5,3]]
expected: 200
case 2
in: [[10,20],[2,2]]
expected: 10
case 3
in: [[],[]]
expected: -1
Starter codePython
def best_eval_checkpoint(steps, scores):
    # Your code here
    pass

3 test cases · run your code against them in the editor