Match text against dots and stars
Return True if the pattern p matches all of the string s, otherwise False. In p, a letter matches itself, . matches any one character, and * stands for zero or more copies of the item right before it, a letter or a .: b* matches "", "b", "bb" and so on, and .* matches any string. The match must cover the whole of s, not just a part of it.
s has 0 to 100 lowercase letters. p has 0 to 100 characters, all lowercase letters, . or *, and every * comes right after a letter or a .. Aim for O(len(s) · len(p)) time.
Besides the tests, one large input (20 letters, 8 stars) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
matches("abbbc", "ab*c")→truematches("ac", "ab*c")→truematches("ab", ".*c")→false