Search
⌘K
Get Premium
Leetcode 3023. Find Pattern in Infinite Stream I
Given a fixed pattern and an infinite character stream arriving one character at a time, determine online whether the pattern has just appeared as a contiguous substring ending at the current position. The challenge is to maintain state efficiently (e.g., with a prefix-function/KMP-style automaton) to support fast per-character queries using O(pattern length) space.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.