Leetcode 291. Word Pattern II
Given a pattern and a string, determine whether you can assign each pattern character to a non-empty substring of the string (different characters map to different substrings) so that concatenating the mapped substrings in pattern order exactly recreates the string; this typically requires backtracking to explore consistent, bijective mappings.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.