You are viewing a single comment's thread. Return to all comments →
We can avoid one while loop inside check_anagram( ) function. As the lengths will be same. This will save few seconds of execution time.
while(a[c] != '\0')
{
first[a[c]-'a']++; second[b[c]-'a']++; c++;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Anagrams
You are viewing a single comment's thread. Return to all comments →
We can avoid one while loop inside check_anagram( ) function. As the lengths will be same. This will save few seconds of execution time.
while(a[c] != '\0')
{
}