Code Room
CodingMediumcod-g1232
Subject Data wranglingLevel Entry–Mid~16 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

A shop compares its own register log against the bank statement, day by day. Both inputs are rows "date,amount" (date like "2026-03-01"; amount an integer, negative for refunds; a date can have many rows in either input). The two agree on a date when the SUMS of that date's amounts match; a date absent from one side counts as sum 0 there. Return the dates that disagree, sorted ascending. Example: register ["2026-03-01,50", "2026-03-01,25", "2026-03-02,40"] vs bank ["2026-03-01,75", "2026-03-02,35"] gives ["2026-03-02"].

Implement
daily_mismatches(register: list[str], bank: list[str]) → list[str]
Examples
in[["2026-03-01,50","2026-03-01,25","2026-03-02,40"],["2026-03-01,75","2026-03-02,35"]]out["2026-03-02"]
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.

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.