Anagram linearly