You are viewing a single comment's thread. Return to all comments →
We can swap the string and reduce the count loop from O(len(s1)) + O(len(s2)) to O(max(len(s1), len(s2)).
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 →
We can swap the string and reduce the count loop from O(len(s1)) + O(len(s2)) to O(max(len(s1), len(s2)).