Problem 3407 · Easy

Substring Matching Pattern

Find the earliest place the prefix starts, then check whether the suffix appears after it; a star matches any run of characters.

Open the interactive visualisation