Maventic interview question

first round:anagram code second round:program about the string.