Skip to content
DeepForgeby svx
All problems
EasyOptimizationop-369

Random Restart Selection Index

Problem

When several random restarts each produce a final validation score, the best run is the one with the lowest score (minimization).

Given the scores, return the index of the best restart, breaking ties toward the earliest index.

Hint

Strict comparison keeps the earliest index on ties.

Test cases

case 1
in: [[3,1,2]]
expected: 1
case 2
in: [[5,5,5]]
expected: 0
case 3
in: [[1,0.5,0.75]]
expected: 1
Starter codePython
def random_restart_selection_index(scores):
    # Your code here
    pass

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