Code Room
Code reviewMedium
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.
Learn the concepts
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.