Given a string pattern representing a search pattern (which may include the wildcard character '*'), and a string str representing the input sequence.
The wildcard '*' in pattern can match zero or more arbitrary characters in str. All other characters in pattern must appear in str in the same order. Return the first starting index (0-based) in str where the pattern matches. If there is no such match, return -1.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected