Word Pattern

Given a pattern string and a space-separated string of words, return true if the pattern matches the words with a one-to-one mapping.

Examples
Input: ["abba","dog cat cat dog"]
Output: true
Hints

Word Pattern

Given a pattern string and a space-separated string of words, return true if the pattern matches the words with a one-to-one mapping.