Word Pattern II (Round 1, LC 291 :)
Problem Overview
- Decide if string s matches a pattern via a bijective mapping from each pattern char to a non-empty substring; return true/false.
- Input: pattern and s; Output: boolean; Constraints: lengths 1–20, lowercase English letters.
- Domain: string pattern matching and text processing, validating one-to-one mappings.
- From Microsoft interviews (Round 1) and a common coding interview interview question/problem (LC 291, Word Pattern II).
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
