Python data engineering interview problem. Difficulty: intermediate. Pattern: Sliding Window. About 14 minutes. Part of the Pro drill bank.
Same behavior as find_anagrams: start indices of anagram windows. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
Implement find_anagrams_window(s: str, p: str) -> list with the same behavior as find_anagrams.
Input: find_anagrams_window('cbaebabacd', 'abc') Output: [0, 6] Same hits as find_anagrams.
Topics: lakebench, python, anagram, window.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Same behavior as find_anagrams: start indices of anagram windows.
Implement `find_anagrams_window(s: str, p: str) -> list` with the same behavior as `find_anagrams`. Example: `"cbaebabacd", "abc"` → `[0, 6]`. Keep the harness.