Given two string arrays word1 and word2, return 'true' if the two arrays represent the same string, 'false' otherwise.
A string is represented by an array if the array elements concatenated in order forms the string.
Input: arrays separated by ',' between arrays; '|' between words within each array.
Format: word1_0|word1_1,...,word2_0|word2_1,...
Input: Two comma-separated groups; within each group words are '|' separated.
Output: Return 'true' if the concatenated strings are equal, otherwise 'false'.
Input: ab|c,a|bc
Output: true
Explanation: 'ab'+'c'='abc' and 'a'+'bc'='abc' → equal.Input: a|cb,ab|c
Output: false
Explanation: 'acb' ≠ 'abc' → false.Input: abc|d|defg,abcddefg
Output: true
Explanation: Both concatenate to 'abcddefg'.1 <= word1.length, word2.length <= 10^31 <= word1[i].length, word2[i].length <= 10^3consist of lowercase English letters