Question
A typo detector fingerprints lowercase words by the gaps between adjacent letters. Given a word of lowercase letters, return the list of differences between each letter's alphabet position and the previous letter's — for adjacent letters s[i-1] and s[i], the gap is position(s[i]) minus position(s[i-1]) and may be negative. A word with fewer than two letters returns an empty list. For example, 'ace' returns [2, 2] and 'ba' returns [-1].
letter_gaps(word: str) → list[int]["ace"]out[2,2]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.