Code RoomCode comprehension before merge
MediumPrep Room Coding #4342

Code comprehension before merge

Vibe & agenticAlgorithms & data structuresEntry–Mid~12 min

An AI assistant solved your bug by handing you a one-line Python fix using `functools.reduce` and a lambda, and it works — the test passes. But you genuinely don't understand how that line does what it does, and your team requires you to be able to explain code you merge. What do you do, and why is 'it passes, so ship it' the wrong move for a junior here?

Implement
explain_fold_steps(values: list[int]) → list[int]
Examples
in[[3,-5,4]]out[3,0,4]
in[[1,2,3]]out[1,3,6]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 12 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.