You are viewing a single comment's thread. Return to all comments →
Thank you, the frozenset trick is great
Can you explain the reasoning behind this line:
count += buckets[key] * (buckets[key]-1) // 2
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 →
Thank you, the frozenset trick is great
Can you explain the reasoning behind this line: