Normalize Scores
results has a column score with at least two different values. Rescale it so the smallest score becomes 0 and the largest becomes 1: each new value is (score - min) / (max - min). Return the list of new values in row order.
Example 1
results {"score":[10,20,30]}
returns [0.0,0.5,1.0]
0.0, 0.5, 1.0.
Constraints
- At least two different values
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.