Loading Company...
This is a verified interview question from Hexaview-technologies. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Anagram Challenge" covers key patterns like Strings.
"Your program should determine how many anagrams exist in a given string and return the total number. For example: if str is "aa aa odg dog gdo" then your program should return 2 because 'dog' and 'gdo' are anagrams of 'odg'. The word 'aa' occurs twice in the string but it isn't an anagram because it is the same word just repeated. The string will contain only spaces and lowercase letters, no punctuation, numbers, or uppercase letters."
Join thousands of developers practicing for Hexaview-technologies.