Solved and implemented anagram substring problem