Available question text
Given s and a pattern p containing exactly two '*' wildcards (each matching any sequence, including empty), find the length of the shortest substring of s that matches p (or -1 if none). The core challenge is to efficiently align the fixed letter segments around the two stars to minimize the substring span under s's length constraints (up to 1e5).
Related questions
Continue with questions that share topics or the same question type.
- Shortest Uncommon Substring in an Array
Coding · Array · Hash Table · String
- String Matching in an Array (Substring Containment)
Coding
- Substring Matching Pattern
Coding
- Camelcase Matching
Coding
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 3455. Shortest Matching Substring
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source