You are viewing a single comment's thread. Return to all comments →
What's the equivalent of converting
for (auto c : a) { ++freq[c - 'a']; } for (auto c : b) { --freq[c - 'a']; } for (auto val : freq) { count += abs(val); }
to a regular for loop? (e.g. for (int i = 0; i < a.size(); i++))
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →
What's the equivalent of converting
to a regular for loop? (e.g. for (int i = 0; i < a.size(); i++))