Question
Implement a length-revealing-free equality routine used inside an auth check. Given two byte-value lists 'a' and 'b' (each element an int 0..255) representing a computed MAC and a provided MAC, return 1 if they are equal and 0 otherwise, but the comparison must accumulate differences over the FULL length rather than short-circuiting. If the lengths differ, return 0, but still fold every byte of the longer input into the accumulator (compare against 0 for missing positions) before returning, so the work done does not branch on the first mismatch. Return the int 1 or 0.
ct_equal(a: list[int], b: list[int]) → int[[1,2,3],[1,2,3]]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.