Given a pattern string pattern and a string s, find if s follows the same pattern.
'Follows' means a full match: each letter in pattern maps bijectively to exactly one distinct word in s.
The input provides pattern and s separated by a comma; s consists of words separated by spaces.
Input: pattern (string of lowercase letters), comma, then sentence s (words separated by spaces).
Output: Return 'true' if s follows pattern, otherwise 'false'.
Input: abba,dog cat cat dog
Output: true
Explanation: a→dog, b→cat; bijective mapping holds.Input: abba,dog cat cat fish
Output: false
Explanation: a maps to both 'dog' and 'fish'.Input: aaaa,dog cat cat dog
Output: false
Explanation: a maps to 'dog','cat','cat','dog' — not consistent.1 <= pattern.length <= 3001 <= words in s <= 300pattern has only lowercase letterswords in s have only lowercase letters