Canned greeting positions
A support chat export sometimes carries the agent canned greeting pasted several times, because the console retried the send. A cleanup tool walks the transcript from left to right one character at a time. Whenever the greeting matches at the current position it records that position and then resumes the walk immediately after that copy, so the copies it records never overlap. Given the transcript and the greeting text, return the start position of every copy the walk records, in the order it finds them, which is ascending. Return an empty list when the greeting is empty, when the transcript is shorter than the greeting, or when no copy is found. The non overlapping rule is the point: in aaaa with greeting aa the walk records 0 and 2, not 0, 1 and 2.
marker_scan_starts(transcript: str, marker: str) → list[int]["hi there hi there ok","hi there"]out[0,9]["aaaa","aa"]out[0,2]["thanks for waiting","hi"]out[]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.
["hi there hi there ok","hi there"][0,9]not run yetsample["aaaa","aa"][0,2]not run yetsample["thanks for waiting","hi"][]not run yetsample