Back to problems

Find Pattern Matching Words

Algorithm · Ebay · Hard

You are given a list of distinct words called wordDict and a string called pattern. Return every word in wordDict that matches the pattern. A word is considered a match when the pattern can be completely consumed against the word by applying the following rules from left to right: A lowercase English letter in the pattern matches only that identical letter in the word. The character '?' matches exactly one arbitrary character. The character '.' matches one or more…

Checking your access…