Question
You are scoring a chatbot's short answers against a reference answer key using normalized exact match. Given equal-length lists outputs and references, normalize each string by lowercasing it, trimming leading and trailing whitespace, and collapsing every internal run of whitespace to a single space. Return the number of positions where the normalized output equals the normalized reference. Example: outputs = [" Paris ", "london"], references = ["paris", "Berlin"] returns 1.
exact_match_count(outputs: list[str], references: list[str]) → int[[" Paris ","london"],["paris","Berlin"]]out1State 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.