Question
Two calibration sensors each output a strictly increasing list of readings. A pairing test asks: how many ways can you pick one reading from sensor a and one from sensor b so that they add up exactly to target? Given a and b (each strictly increasing, no duplicates within a list) and the target, return the count. Walk a forward and b backward in one combined pass. Example: a = [1, 3, 5], b = [2, 4, 6], target = 7 gives 3 (1+6, 3+4, 5+2).
count_matching_pairs(a: list[int], b: list[int], target: int) → int[[1,3,5],[2,4,6],7]out3State 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.