Check If Two String Arrays are Equivalent Problem
Check If Two String Arrays are Equivalent Problem — ExecCode Easy DSA Practice
Solve the Check If Two String Arrays are Equivalent problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise. Your task is to a string is represented by an array if the array elements concatenated in order forms the string. Return the required answer exactly as shown in the examples.
Examples
Input {"word1": ["ab", "c"], "word2": ["a", "bc"]}; Output True. Input {"word1": ["a", "cb"], "word2": ["ab", "c"]}; Output False
Constraints
1 <= word1.length, word2.length <= 10^3 1 <= word1[i].length, word2[i].length <= 10^3 1 <= sum(word1[i].length), sum(word2[i].length) <= 10^3 word1[i] and word2[i] consist of lowercase letters.
Practice Check If Two String Arrays are Equivalent free on ExecCode. Browse DSA problems, topic map, and placement guides.