Leetcode 3037. Find Pattern in Infinite Stream II
Given an unbounded stream of characters, design an online algorithm that processes each incoming character and reports whether a given pattern has just appeared as a contiguous substring, while using limited per-character time and bounded memory. This requires building an efficient state machine or rolling-match structure (e.g., KMP/Aho-Corasick/automaton or streaming hash) to update match state incrementally.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.