Question
Verify on-disk chunk integrity. A file is split into chunks; you are given two parallel lists: `chunks` (each a string of bytes) and `expected` (each an integer checksum that was stored when the chunk was written). The checksum of a chunk is defined deterministically as the Adler-32-style rolling sum: a = 1, b = 0; for each byte v of the UTF-8 encoding, a = (a + v) mod 65521 and b = (b + a) mod 65521; the checksum is (b * 65536 + a). Recompute each chunk's checksum and return a list of the 0-based indices of all chunks whose recomputed checksum does NOT match its expected value (i.e. corrupted chunks), in ascending index order. The two lists have equal length <= 10^4.
verify_chunks(chunks: list[str], expected: list[int]) → list[int][["abc","abc"],[38600999,1]]out[1]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.