You are viewing a single comment's thread. Return to all comments →
passed all test cases in 0s
string in1,in2; cin>>in1>>in2; int array[26] = {0}; for(int i=0;i<in1.length();i++) array[in1[i]-'a']++; for(int i=0;i<in2.length();i++) array[in2[i]-'a']--; int sum = 0; for(int i=0;i<26;i++) sum+=abs(array[i]); cout<<sum; return 0;
Seems like cookies are disabled on this browser, please enable them to open this website
Making Anagrams
You are viewing a single comment's thread. Return to all comments →
passed all test cases in 0s