Sherlock and Anagrams

  • + 2 comments

    Yes, you can use a hashmap to get a solution that runs in O(N^2). You just have to do some little tricks in order to efficiently get hashcodes for the count arrays. https://www.hackerrank.com/challenges/sherlock-and-anagrams/submissions/code/23455764