class Solution {
public:
bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) {
string str1,str2;
for(auto &str : word1) str1 += str;
for(auto &str : word2) str2 += str;
return str1 == str2;
}
};
class Solution {
public:
int mostWordsFound(vector<string>& sentences) {
int res = 0;
for (string& sentence: sentences) {
int cnt = count(sentence.begin(), sentence.end(), ' ') + 1;
res = max(res, cnt);
}
return res;
}
};