Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Find the earliest starting index in a text string where a wildcard pattern matches.
The wildcard character '*' can represent zero or more arbitrary characters, while all other characters must appear in exact order.
Return -1 if no valid match exists within the given string constraints.
What This Tests
String manipulation and parsing
Greedy matching strategies
Index tracking and boundary condition handling
Efficient sequential substring search
Common Patterns
Greedy
Two Pointers
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected