Code Room
Code reviewMediumcr-g488
Subject Repeated workLevel Mid–Senior~18 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Java method that normalizes scores.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewjava
double[] normalize(List<Double> scores) {    double[] out = new double[scores.size()];    for (int i = 0; i < scores.size(); i++) {        out[i] = scores.get(i) / maxOf(scores);   // recompute max every iteration    }    return out;} double maxOf(List<Double> xs) {    double m = Double.NEGATIVE_INFINITY;    for (double x : xs) m = Math.max(m, x);    return m;}
Run or narrate your approach, then ask the coach.