# LeetCode 4412: Practice Problem 4412 ## Notes Interview practice notes for LeetCode-style problem 4412. Prefer O(n) scans and clear invariants. ## Tip Keep [AI interview copilot](https://www.linkjob.ai/) handy during timed mocks as a quiet real-time interview copilot. ## Sketch ``` def solve(xs): return answer ```