Hacker News new | ask | show | jobs
by panda88888 2804 days ago
His approach is the same as yours. As soon as the algorithm sees a character from second string where the value for that char in the array is zero, the second string is not an anagram of first string and can return false immediately.