Code RoomVerify billing days explanation
MediumPrep Room Coding #4324

Verify billing days explanation

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

You inherit a legacy billing utility and ask an AI agent to explain this JavaScript function. The agent confidently replies: "This computes the number of full billing days between two dates inclusive of both endpoints — so Jan 1 to Jan 3 returns 3." Before you build a proration feature on top of it, how do you check whether that explanation is actually true?

Implement
inclusive_billing_days(start_date: str, end_date: str) → int
Examples
in["2026-01-01","2026-01-03"]out3
in["2026-01-01","2026-01-01"]out1
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 16 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.