Code Room
Vibe codingHardvc-g372
Subject Ai tool selectionLevel Senior–Staff~18 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You need to implement the core money-rounding and currency-allocation logic for a payments split (e.g. divide $100.00 across 3 payees so the cents always reconcile to the total). An agent has produced two plausible Java implementations on two tries; both pass the happy-path tests but you're uneasy about edge cases. When do you stop prompting and just write this yourself, and how do you justify that call?

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.

Describe your solution

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.