Question
A picker scans items one by one, and the scans so far should match the start of the pick list exactly. Given the codes scanned so far and the full pick list, return true if the scan sequence is a prefix of the pick list — same values, same order, starting from the first entry. An empty scan log is always a valid prefix. Example: scans [12, 5] against pick list [12, 5, 9] return true.
scans_match_start(scans: list[int], picklist: list[int]) → bool[[12,5],[12,5,9]]outtrueState 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.