#3407

Substring Matching Pattern

pupil · 540 · lc easy +28 · 28.4% accepted · 116 likes · top 6%

Description

You are given a string s and a pattern string p containing exactly one '*' character.

The '*' may be replaced by any sequence of zero or more characters.

Return true if p (with the wildcard expanded) can match a substring of s, otherwise return false.

Code

1
2
3