Easy
Quiz
#290 Word Pattern
APPROACH
Given a pattern string and a string s, determine whether s obeys the same pattern.
A full match requires a one-to-one correspondence (bijection) where:
- Each letter in pattern maps to exactly one unique word in s.
- Each unique word in s maps to exactly one letter in pattern.
- No two letters map to the same word, and no two words map to the same letter.
1 of 4
1:00
What is the optimal approach for this problem?