2023-12-01 11:21:29 +0300 MSK
Check If Two String Arrays are Equivalent
Links
Code
class Solution {
public:
bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) {
string s1 = "";
string s2 = "";
for(const string& s : word1) {
s1 += s;
}
for(const string& s : word2) {
s2 += s;
}
return s1==s2;
}
};