You are viewing a single comment's thread. Return to all comments →
Hint : The problem boils down to writing an acceptable hash method for anagramic strings. The last test case will fail with naive hash methods. Despite the same O(n) complexity for both methods, it makes a huge difference 2+s vs 0.64s.