You are given an array of strings chunks and an array of strings queries.
First, concatenate all strings in chunks in order to form a single text string s.
The string s is divided into words according to the following rules:
Words consist of lowercase English letters and joiner hyphens '-'.
A hyphen '-' is considered a joiner hyphen if and only if it is immediately preceded and immediately followed by a lowercase English letter.
Any character that is not part of a valid word (such as spaces and non joiner hyphens) serves as a separator.
Consecutive separators are treated as a single delimiter.
For each query in queries, determine how many times queries[i] appears as an exact full word in s.
Return an integer array where the queries[i] in s.
Constraints:
chunks.length
chunks[i].length
The total length of all strings in chunks does not exceed
chunks[i] consists only of lowercase English letters, spaces, and '-'.
queries.length
queries[i].length
The total length of all strings in queries does not exceed
queries[i] consists only of lowercase English letters and '-'.
queries[i] is a valid word: it does not start or end with '-', and it does not contain
You are given an array of strings chunks and an array of strings queries.
First, concatenate all strings in chunks in order to form a single text string s.
The string s is divided into words according to the following rules:
Words consist of lowercase English letters and joiner hyphens '-'.
A hyphen '-' is considered a joiner hyphen if and only if it is immediately preceded and immediately followed by a lowercase English letter.
Any character that is not part of a valid word (such as spaces and non joiner hyphens) serves as a separator.
Consecutive separators are treated as a single delimiter.
For each query in queries, determine how many times queries[i] appears as an exact full word in s.
Return an integer array where the queries[i] in s.
Constraints:
chunks.length
chunks[i].length
The total length of all strings in chunks does not exceed
chunks[i] consists only of lowercase English letters, spaces, and '-'.
queries.length
queries[i].length
The total length of all strings in queries does not exceed
queries[i] consists only of lowercase English letters and '-'.
queries[i] is a valid word: it does not start or end with '-', and it does not contain