Question
A report generator needs every data row to have exactly `size` columns. Given a row of integers, a required size (size >= 0), and a fill value, return the row adjusted to that exact length: if it is too short, append the fill value until it fits; if it is too long, keep only the first `size` entries; if it already fits, return it unchanged. Example: [1, 2] with size 4 and fill 0 becomes [1, 2, 0, 0].
fit_to_length(row: list[int], size: int, fill: int) → list[int][[1,2],4,0]out[1,2,0,0]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.
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.