Code Room
CodingEasy
Question
Given y_true and y_pred (equal-length non-empty lists of numbers), compute the mean absolute error (MAE = mean of |y_true - y_pred|) and the root mean squared error (RMSE = sqrt of the mean of (y_true - y_pred)^2). Return [mae, rmse], each rounded to 6 decimals.
Implement
mae_rmse(y_true: list[float], y_pred: list[float]) → list[float]Examples
in
[[1,2,3],[1,2,3]]out[0,0]What a strong answer looks like
State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.