Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Find Pattern in Infinite Stream II
Coding
- Find and Replace Pattern
Coding
- Find Consecutive Integers from a Data Stream
Coding
- Find Median from Data Stream
Coding · Data Stream · Design · Heap (Priority Queue)
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3023. Find Pattern in Infinite Stream I
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source