You are viewing a single comment's thread. Return to all comments →
Just to prove that C++ can also be equally idiomatic:
bool ransom_note(vector<string> magazine, vector<string> ransom) { sort(magazine.begin(), magazine.end()); sort(ransom.begin(), ransom.end()); return includes(magazine.begin(), magazine.end(), ransom.begin(), ransom.end()); }
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
Just to prove that C++ can also be equally idiomatic: